diff --git a/src/config.h b/src/config.h index dd741ac7ae..ff37991558 100644 --- a/src/config.h +++ b/src/config.h @@ -30,6 +30,8 @@ #ifndef CONFIG_H #define CONFIG_H +#include + #ifdef __APPLE__ #include // for fcntl(fd, F_FULLFSYNC) #include @@ -96,9 +98,11 @@ #endif /* Test for accept4() */ -#if defined(__linux__) || defined(OpenBSD5_7) || \ - (__FreeBSD__ >= 10 || __FreeBSD_version >= 1000000) || \ - (defined(NetBSD8_0) || __NetBSD_Version__ >= 800000000) +#if defined(__linux__) || \ + defined(__FreeBSD__) || \ + defined(OpenBSD5_7) || \ + (defined(__DragonFly__) && __DragonFly_version >= 400305) || \ + (defined(__NetBSD__) && (defined(NetBSD8_0) || __NetBSD_Version__ >= 800000000)) #define HAVE_ACCEPT4 1 #endif @@ -316,7 +320,7 @@ void setcpuaffinity(const char *cpulist); #endif /* Test for posix_fadvise() */ -#if defined(__linux__) || __FreeBSD__ >= 10 +#if defined(__linux__) || defined(__FreeBSD__) #define HAVE_FADVISE #endif