49 lines
2.6 KiB
Diff
49 lines
2.6 KiB
Diff
|
From 8510661e0b6e79085997c2c2dc6a406113dc61df Mon Sep 17 00:00:00 2001
|
||
|
From: Milian Wolff <mail@milianw.de>
|
||
|
Date: Mon, 17 Nov 2014 16:13:42 +0100
|
||
|
Subject: [PATCH 19/23] Define _DEFAULT_SOURCE together with _BSD_SOURCE.
|
||
|
|
||
|
This silences the following compile warnings with newer GNU libc:
|
||
|
|
||
|
warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
|
||
|
|
||
|
REVIEW: 121147
|
||
|
---
|
||
|
cmake/modules/FindKDE4Internal.cmake | 6 +++---
|
||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||
|
|
||
|
diff --git a/cmake/modules/FindKDE4Internal.cmake b/cmake/modules/FindKDE4Internal.cmake
|
||
|
index 134d14f..a9aecfd 100644
|
||
|
--- a/cmake/modules/FindKDE4Internal.cmake
|
||
|
+++ b/cmake/modules/FindKDE4Internal.cmake
|
||
|
@@ -1099,7 +1099,7 @@ endif (APPLE)
|
||
|
|
||
|
if (CMAKE_SYSTEM_NAME MATCHES Linux OR CMAKE_SYSTEM_NAME STREQUAL GNU)
|
||
|
if (CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||
|
- set ( _KDE4_PLATFORM_DEFINITIONS -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_GNU_SOURCE)
|
||
|
+ set ( _KDE4_PLATFORM_DEFINITIONS -D_XOPEN_SOURCE=500 -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE)
|
||
|
set ( CMAKE_SHARED_LINKER_FLAGS "-Wl,--fatal-warnings -Wl,--no-undefined -lc ${CMAKE_SHARED_LINKER_FLAGS}")
|
||
|
set ( CMAKE_MODULE_LINKER_FLAGS "-Wl,--fatal-warnings -Wl,--no-undefined -lc ${CMAKE_MODULE_LINKER_FLAGS}")
|
||
|
|
||
|
@@ -1114,7 +1114,7 @@ if (CMAKE_SYSTEM_NAME MATCHES Linux OR CMAKE_SYSTEM_NAME STREQUAL GNU)
|
||
|
endif(CMAKE_BUILD_TYPE_TOLOWER MATCHES profile)
|
||
|
endif (CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||
|
if (CMAKE_C_COMPILER MATCHES "icc")
|
||
|
- set ( _KDE4_PLATFORM_DEFINITIONS -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_GNU_SOURCE)
|
||
|
+ set ( _KDE4_PLATFORM_DEFINITIONS -D_XOPEN_SOURCE=500 -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE)
|
||
|
set ( CMAKE_SHARED_LINKER_FLAGS "-Wl,--fatal-warnings -Wl,--no-undefined -lc ${CMAKE_SHARED_LINKER_FLAGS}")
|
||
|
set ( CMAKE_MODULE_LINKER_FLAGS "-Wl,--fatal-warnings -Wl,--no-undefined -lc ${CMAKE_MODULE_LINKER_FLAGS}")
|
||
|
endif (CMAKE_C_COMPILER MATCHES "icc")
|
||
|
@@ -1218,7 +1218,7 @@ if (CMAKE_COMPILER_IS_GNUCXX)
|
||
|
# It is kept here nonetheless both for backwards compatibility in case one does not use add_definitions(${KDE4_DEFINITIONS})
|
||
|
# and also because it is/was needed by glibc for snprintf to be available when building C files.
|
||
|
# See commit 4a44862b2d178c1d2e1eb4da90010d19a1e4a42c.
|
||
|
- add_definitions (-D_BSD_SOURCE)
|
||
|
+ add_definitions (-D_DEFAULT_SOURCE -D_BSD_SOURCE)
|
||
|
endif (CMAKE_SYSTEM_NAME MATCHES Linux OR CMAKE_SYSTEM_NAME STREQUAL GNU)
|
||
|
|
||
|
if (CMAKE_SYSTEM_NAME STREQUAL GNU)
|
||
|
--
|
||
|
1.9.3
|
||
|
|