From: Ramsay Jones Date: Sat, 3 Mar 2007 18:28:52 +0000 (+0000) Subject: Fix an "implicit function definition" warning. X-Git-Tag: v1.5.0.3~11 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=41b200179dfac7bf4c3b98270951937b537e2b24;p=git.git Fix an "implicit function definition" warning. The function at issue being initgroups() from the 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 Signed-off-by: Junio C Hamano --- diff --git a/git-compat-util.h b/git-compat-util.h index 9863cf671..309240bbc 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -47,9 +47,15 @@ #include #include #include +#if defined(__CYGWIN__) +#undef _XOPEN_SOURCE +#include +#define _XOPEN_SOURCE 600 +#else #undef _ALL_SOURCE /* AIX 5.3L defines a struct list with _ALL_SOURCE. */ #include #define _ALL_SOURCE 1 +#endif #ifndef NO_ICONV #include