[cmake] always define _GNU_SOURCE

first.h only defines _GNU_SOURCE if no config.h is present.
This commit is contained in:
Stefan Bühler 2016-07-30 14:19:43 +02:00
parent 5863d05ec1
commit f7b3745552
2 changed files with 4 additions and 1 deletions

View File

@ -687,7 +687,6 @@ if(CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_WITHDEBINFO} -O2")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${WARN_LDFLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${WARN_LDFLAGS}")
add_definitions(-D_GNU_SOURCE)
endif()
if((NOT APPLE) OR CMAKE_COMPILER_IS_GNUCC)

View File

@ -8,6 +8,10 @@
#define PACKAGE_VERSION "${PACKAGE_VERSION}"
#define LIBRARY_DIR "${LIGHTTPD_LIBRARY_DIR}"
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif
/* System */
#cmakedefine HAVE_SYS_DEVPOLL_H
#cmakedefine HAVE_SYS_EPOLL_H