Re: [BUG] daemon.c blows up on OSX
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- Dec 20, 2006, 23:07 UTC
- Message-ID
- <Pine.LNX.4.64.0612201502090.3576@woody.osdl.org>
- In-Reply-To
- <86ac1iyyla.fsf@blue.stonehenge.com>
On Wed, 20 Dec 2006, Randal L. Schwartz wrote:
Show 5 quoted lines
> > According to my headers, "strncasecmp" is defined in <string.h>, > "NI_MAXSERV" is defined in <netdb.h>, and "initgrps" is defined > in "unistd.h". So this patch works (just verified on OSX), but I > don't know what damage it does elsehwere:
Look at "cache.h": the first thing it does is to include "git-compat-util.h". And THAT in turn does include ALL the headers you added (string.h, netdb.h and unistd.h).
So it would appear that for OS X, the
#define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */ #define _GNU_SOURCE #define _BSD_SOURCE
sequence actually _disables_ those things.
Some googling finds a python source diff:
# On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE # disables platform specific features beyond repair. - Darwin/8.*) + Darwin/8.*|Darwin/7.*) define_xopen_source=no ;;
(and Ruby shows up as well in the google)
Can you try to grovel around in the OS X headers, and see what the magic is to enable all the compatibility crud on OS X?