Browse Source

[cmake] always define _GNU_SOURCE

first.h only defines _GNU_SOURCE if no config.h is present.
personal/stbuehler/mod-csrf-old
Stefan Bühler 5 years ago
parent
commit
f7b3745552
  1. 1
      src/CMakeLists.txt
  2. 4
      src/config.h.cmake

1
src/CMakeLists.txt

@ -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)

4
src/config.h.cmake

@ -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

Loading…
Cancel
Save