Re: [BUG] daemon.c blows up on OSX
- From
- Terje Sten Bjerkseth <terje@bjerkseth.org>
- Date
- Dec 21, 2006, 00:36 UTC
- Message-ID
- <caf068570612201636g75180138r223aef7c42f69a50@mail.gmail.com>
- In-Reply-To
- <Pine.LNX.4.64.0612201524230.3576@woody.osdl.org>
On 12/21/06, Linus Torvalds <torvalds@osdl.org> wrote:
Show 13 quoted lines
> So it really would be a hell of a lot better to figure out _why_ strings.h > doesn't "just work" when _XOPEN_SOURCE_EXTENDED is set. Or if there are > better alternatives that work on HP-UX.. > > Does adding a > > #define _SVID_SOURCE 1 > > help? Also, we should probably make the _GNU_SOURCE and _BSD_SOURCE > defines define to 1 (which is the way they'd be if we used -D_GNU_SOURCE > on the compiler command line) > > IOW, the appended ...
For Mac OS X 10.4, _XOPEN_SOURCE seems to define _POSIX_C_SOURCE which causes the NI_MAXSERV problem in netdb.h. The appended seems to make it work.
--
diff --git a/git-compat-util.h b/git-compat-util.h index bc296b3..41fa7f6 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -11,8 +11,10 @@ #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0])) +#ifndef __APPLE_CC__ #define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */ #define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */ +#endif #define _GNU_SOURCE