From da7bad50ed0816cf2ee7f558ed154a7c67fb546d Mon Sep 17 00:00:00 2001 From: Ramsay Allan Jones Date: Sun, 30 Jul 2006 16:52:09 +0100 Subject: Fix header breakage with _XOPEN_SOURCE. convert-objects.c sets _XOPEN_SOURCE and _XOPEN_SOURCE_EXTENDED before including , in order to get the declaration of strptime(). This leads to breakage in cache.h, due to S_ISLNK and S_IFLNK no longer being defined by . These definitions are protected by the __USE_BSD symbol, which is not set when _XOPEN_SOURCE is set. Moving the #defines and #include below all other #includes does not fix the problem, however, since now _USE_XOPEN, which protects the declaration of strptime(), is now not defined (don't ask!). The fix is to #define _GNU_SOURCE, which enables the definition of practically everything. Signed-off-by: Ramsay Allan Jones Signed-off-by: Junio C Hamano --- convert-objects.c | 1 + 1 file changed, 1 insertion(+) (limited to 'convert-objects.c') diff --git a/convert-objects.c b/convert-objects.c index ebea8e472b..168771ed85 100644 --- a/convert-objects.c +++ b/convert-objects.c @@ -1,5 +1,6 @@ #define _XOPEN_SOURCE 500 /* glibc2 and AIX 5.3L need this */ #define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */ +#define _GNU_SOURCE #include #include "cache.h" #include "blob.h" -- cgit v1.2.3