Skip to content

Commit

Permalink
Fix an "implicit function definition" warning.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ramsay Jones authored and Junio C Hamano committed Mar 4, 2007
1 parent ee96d11 commit 41b2001
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions git-compat-util.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,15 @@
#include <netdb.h>
#include <pwd.h>
#include <inttypes.h>
#if defined(__CYGWIN__)
#undef _XOPEN_SOURCE
#include <grp.h>
#define _XOPEN_SOURCE 600
#else
#undef _ALL_SOURCE /* AIX 5.3L defines a struct list with _ALL_SOURCE. */
#include <grp.h>
#define _ALL_SOURCE 1
#endif

#ifndef NO_ICONV
#include <iconv.h>
Expand Down

0 comments on commit 41b2001

Please sign in to comment.