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>
This commit is contained in:
parent
ee96d11beb
commit
41b200179d
@ -47,9 +47,15 @@
|
|||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#include <inttypes.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. */
|
#undef _ALL_SOURCE /* AIX 5.3L defines a struct list with _ALL_SOURCE. */
|
||||||
#include <grp.h>
|
#include <grp.h>
|
||||||
#define _ALL_SOURCE 1
|
#define _ALL_SOURCE 1
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef NO_ICONV
|
#ifndef NO_ICONV
|
||||||
#include <iconv.h>
|
#include <iconv.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user