Explorar el Código

civetweb.c: fix setgroups() -Wimplicit-function-declaration

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Danny Al-Gaaf hace 10 años
padre
commit
5e753cc4d9
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      src/civetweb.c

+ 4 - 0
src/civetweb.c

@@ -25,6 +25,9 @@
 #define _CRT_SECURE_NO_WARNINGS /* Disable deprecation warning in VS2005 */
 #define _CRT_SECURE_NO_WARNINGS /* Disable deprecation warning in VS2005 */
 #endif
 #endif
 #else
 #else
+#if defined(__GNUC__) && !defined(_GNU_SOURCE)
+# define _GNU_SOURCE          /* for setgroups() */
+#endif
 #ifdef __linux__
 #ifdef __linux__
 #define _XOPEN_SOURCE 600     /* For flockfile() on Linux */
 #define _XOPEN_SOURCE 600     /* For flockfile() on Linux */
 #endif
 #endif
@@ -284,6 +287,7 @@ typedef unsigned short int in_port_t;
 
 
 #include <pwd.h>
 #include <pwd.h>
 #include <unistd.h>
 #include <unistd.h>
+#include <grp.h> 
 #include <dirent.h>
 #include <dirent.h>
 #if !defined(NO_SSL_DL) && !defined(NO_SSL)
 #if !defined(NO_SSL_DL) && !defined(NO_SSL)
 #include <dlfcn.h>
 #include <dlfcn.h>