summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Belfer <arrbee@arrbee.com>2012-02-01 13:20:47 -0800
committerRussell Belfer <arrbee@arrbee.com>2012-02-01 13:20:47 -0800
commit38691ffc67fad350e5d71dbe53d25514089b61cf (patch)
tree7fbedac0b906ba64ed0e78cb11bd4338d0d52290
parente8c96ed2a74a4fcd9789721b4ebfd78586b3a16f (diff)
downloadlibgit2-38691ffc67fad350e5d71dbe53d25514089b61cf.tar.gz
Compile with _GNU_SOURCE when appropriate
On non-Windows builds, we will now use _GNU_SOURCE so header files will include modern API extensions. This should resolve issue #547.
-rw-r--r--CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7858164f7..3a09605a7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -65,7 +65,7 @@ IF (MSVC)
SET(CMAKE_C_FLAGS_RELEASE "/MT /O2")
SET(WIN_RC "src/win32/git2.rc")
ELSE ()
- SET(CMAKE_C_FLAGS "-O2 -g -Wall -Wextra -Wno-missing-field-initializers -Wstrict-aliasing=2 -Wstrict-prototypes -Wmissing-prototypes ${CMAKE_C_FLAGS}")
+ SET(CMAKE_C_FLAGS "-O2 -g -D_GNU_SOURCE -Wall -Wextra -Wno-missing-field-initializers -Wstrict-aliasing=2 -Wstrict-prototypes -Wmissing-prototypes ${CMAKE_C_FLAGS}")
SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
IF (NOT MINGW) # MinGW always does PIC and complains if we tell it to
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")