[CMAKE] Define _GNU_SOURCE on CMakeLists.txt
The latest elfutils-libelf headers won't compile without _LARGEFILE64_SOURCE (that is implied by _GNU_SOURCE). Some .c files don't have a #define _GNU_SOURCE line. Instead of adding the line to all .c files, define it globally on CMakeLists.txt. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
This commit is contained in:
parent
60737d18e3
commit
15c6f261b6
|
@ -23,6 +23,7 @@ if (NOT CMAKE_BUILD_TYPE)
|
|||
FORCE)
|
||||
endif (NOT CMAKE_BUILD_TYPE)
|
||||
|
||||
add_definitions(-D_GNU_SOURCE)
|
||||
find_package(DWARF REQUIRED)
|
||||
|
||||
_set_fancy(LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}${CMAKE_INSTALL_PREFIX}/${__LIB}" "libdir")
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <assert.h>
|
||||
#include <dirent.h>
|
||||
#include <dwarf.h>
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
* by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <argp.h>
|
||||
#include <malloc.h>
|
||||
#include <search.h>
|
||||
|
|
Loading…
Reference in New Issue