@matheusbsbs / matheus-bagliano / commits / 41b200179d
Fork 0

Fix an "implicit function definition" warning.

The function at issue being initgroups() from the <grp.h> header file. On Cygwin, setting _XOPEN_SOURCE suppresses the definition of initgroups(), which causes the warning while compiling daemon.c. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <junkio@cox.net>

Ramsay Jones committed Mar 3, 2007 at 18:28 UTC 41b200179dfac7bf4c3b98270951937b537e2b24
1 file changed +6
git-compat-util.h
+6
@@ -47,9 +47,15 @@
47 #include <netdb.h>
48 #include <pwd.h>
49 #include <inttypes.h>
50 +#if defined(__CYGWIN__)
51 +#undef _XOPEN_SOURCE
52 +#include <grp.h>
53 +#define _XOPEN_SOURCE 600
54 +#else
55 #undef _ALL_SOURCE /* AIX 5.3L defines a struct list with _ALL_SOURCE. */
56 #include <grp.h>
57 #define _ALL_SOURCE 1
58 +#endif
59
60 #ifndef NO_ICONV
61 #include <iconv.h>