Skip to content

Commit

Permalink
Fix system header problems on Mac OS X
Browse files Browse the repository at this point in the history
For Mac OS X 10.4, _XOPEN_SOURCE defines _POSIX_C_SOURCE which
hides many symbols from the program.

Breakage noticed and initial analysis provided by Randal
L. Schwartz.

Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Terje Sten Bjerkseth authored and Junio C Hamano committed Dec 21, 2006
1 parent 5b85143 commit c902c9a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions git-compat-util.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit c902c9a

Please sign in to comment.