diff --git a/CMakeLists.txt b/CMakeLists.txt index 98082cde..5a49875c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -334,7 +334,7 @@ if (NOT DEFINED _GNU_SOURCE) endif() if (_GNU_SOURCE) - add_definitions(-D_GNU_SOURCE) + add_definitions(-D_GNU_SOURCE=1) endif() CHECK_INCLUDE_FILE(sys/types.h EVENT__HAVE_SYS_TYPES_H) diff --git a/configure.ac b/configure.ac index 0f5495d6..b8a7839d 100644 --- a/configure.ac +++ b/configure.ac @@ -478,7 +478,7 @@ fi AC_MSG_CHECKING(for F_SETFD in fcntl.h) AC_EGREP_CPP(yes, [ -#define _GNU_SOURCE +#define _GNU_SOURCE 1 #include #ifdef F_SETFD yes @@ -667,7 +667,7 @@ AC_CHECK_SIZEOF(off_t) AC_CHECK_SIZEOF(time_t) AC_CHECK_TYPES([struct in6_addr, struct sockaddr_in6, sa_family_t, struct addrinfo, struct sockaddr_storage], , , -[#define _GNU_SOURCE +[#define _GNU_SOURCE 1 #include #ifdef HAVE_NETINET_IN_H #include diff --git a/include/event2/util.h b/include/event2/util.h index 7c872737..e6df6289 100644 --- a/include/event2/util.h +++ b/include/event2/util.h @@ -58,9 +58,6 @@ extern "C" { #endif #include #ifdef EVENT__HAVE_NETDB_H -#if !defined(_GNU_SOURCE) -#define _GNU_SOURCE -#endif #include #endif