aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f5a2987f01..4cafdef73f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -290,13 +290,14 @@ option(LOG_LIST_ACTIONS "Add list actions logging" OFF)
add_definitions(-DINCLUDE_GENERATED_DECLARATIONS)
-if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
+if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-undefined")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined")
# For O_CLOEXEC, O_DIRECTORY, and O_NOFOLLOW flags on older systems
# (pre POSIX.1-2008: glibc 2.11 and earlier). #4042
+ # For ptsname(). #6743
add_definitions(-D_GNU_SOURCE)
endif()