Opened 9 years ago

Closed 9 years ago

#8335 closed defect (fixed)

basename - mythcommandlineparser.cpp build failure on Mac

Reported by: dougt@… Owned by: Nigel
Priority: minor Milestone: unknown
Component: Ports - OSX Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

On the mac, we need to #include <libgen.h> when using |basename|. See:

http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man3/basename.3.html

Without this, we fail to compile here.

mythcommandlineparser.cpp: In member function ‘bool MythCommandLineParser::PreParse(int, const char* const*, int&, bool&)’:
mythcommandlineparser.cpp:60: error: ‘basename’ was not declared in this scope
make[2]: *** [mythcommandlineparser.o] Error 1

I added the #include directly in this file, but there is probably a better place for it.

Attachments (1)

mythcommandlineparse_osx.diff (400 bytes) - added by robertm 9 years ago.
Add include required for OS X

Download all attachments as: .zip

Change History (3)

Changed 9 years ago by robertm

Add include required for OS X

comment:1 Changed 9 years ago by robertm

Status: newinfoneeded_new

Nigel,

Attached patch for your approval. This include is required since r24030.

Robert

comment:2 Changed 9 years ago by robertm

Resolution: fixed
Status: infoneeded_newclosed

(In [24081]) Fix #8335. Add include required for building on OS X since r24030. If any of the Mac OS X devs see an issue with the location of the include or otherwise, please feel free to revert or correct.

Note: See TracTickets for help on using tickets.