Re: [BUG] daemon.c blows up on OSX

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Terje Sten Bjerkseth" <terje@xxxxxxxxxxxxx> writes:

> On 12/21/06, Linus Torvalds <torvalds@xxxxxxxx> wrote:
>> 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
> #define _BSD_SOURCE

Thanks.  While this is in a better direction than randomly
including the headers in the source, it is still sad.

Does everybody use Apple CC on OSX?  Is the symbol defined even
with GCC?  Or Gcc fixes headers well enough and makes this a
non-issue?

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]