diff --git a/configure.ac b/configure.ac index 58208420b3..d900c1e686 100644 --- a/configure.ac +++ b/configure.ac @@ -188,7 +188,7 @@ AC_CHECK_HEADERS([sys/time.h time.h unistd.h sys/param.h]) AC_CHECK_HEADERS([sys/ioctl.h linux/if_ether.h linux/if_packet.h linux/filter.h]) AC_CHECK_HEADERS([linux/ethtool.h linux/sockios.h]) - AC_CHECK_HEADERS([glob.h locale.h]) + AC_CHECK_HEADERS([glob.h locale.h grp.h pwd.h]) AC_CHECK_HEADERS([dirent.h fnmatch.h]) AC_CHECK_HEADERS([sys/resource.h sys/types.h sys/un.h]) AC_CHECK_HEADERS([sys/random.h]) diff --git a/src/suricata-common.h b/src/suricata-common.h index 3636517250..d1937c245c 100644 --- a/src/suricata-common.h +++ b/src/suricata-common.h @@ -206,6 +206,14 @@ #include #endif +#ifdef HAVE_GRP_H +#include +#endif + +#ifdef HAVE_PWD_H +#include +#endif + #if __CYGWIN__ #if !defined _X86_ && !defined __x86_64 #define _X86_ diff --git a/src/util-privs.c b/src/util-privs.c index bed5889b9a..8c2c4ce89b 100644 --- a/src/util-privs.c +++ b/src/util-privs.c @@ -26,8 +26,6 @@ #ifndef OS_WIN32 -#include -#include #include "suricata-common.h" #include "util-debug.h" #include "suricata.h"