diff --git a/configure.in b/configure.in index 19410ce024..6742860d88 100644 --- a/configure.in +++ b/configure.in @@ -91,9 +91,12 @@ AC_INIT(configure.in) # Checks for header files. AC_CHECK_HEADERS([arpa/inet.h inttypes.h limits.h netdb.h poll.h signal.h stdint.h stdlib.h string.h syslog.h sys/ioctl.h sys/prctl.h sys/socket.h sys/syscall.h netinet/in.h sys/time.h unistd.h windows.h winsock2.h ws2tcpip.h]) - AC_CHECK_HEADERS([sys/socket.h net/if.h], [], [], + AC_CHECK_HEADERS([sys/socket.h net/if.h sys/prctl.h], [], [], [[#ifdef HAVE_SYS_SOCKET_H #include +#endif +#ifdef HAVE_SYS_PRCTL_H +#include #endif ]]) diff --git a/src/util-coredump-config.c b/src/util-coredump-config.c index 9d40ecb283..6c4fc4be01 100644 --- a/src/util-coredump-config.c +++ b/src/util-coredump-config.c @@ -80,9 +80,8 @@ int32_t CoredumpLoadConfig (void) return 0; #endif -#if !defined OS_FREEBSD && !defined __OpenBSD__ && !defined __CYGWIN__ && !defined OS_WIN32 -/* Linux specific core dump configuration; set dumpable flag if needed */ -#include +#ifdef HAVE_SYS_PRCTL_H + /* Linux specific core dump configuration; set dumpable flag if needed */ int dumpable = 0; dumpable = prctl (PR_GET_DUMPABLE, 0, 0, 0, 0); if (dumpable == -1) {