From 6684cb99bdf408fc491e547393dbd7aac4d151f2 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Fri, 31 Aug 2018 10:26:28 +0200 Subject: Add _XOPEN_SOURCE to C definitions When building on non-glibc Unix platforms, such as Solaris, NetBSD, and Linux/musl or Linux/uclibc, multiple components of KF5 fail to build. This is because -std=iso9899:1990 is specified (for strict C90 compliance) but _XOPEN_SOURCE is not defined, so none of the POSIX interfaces are exported. I have seen this reported in at least: * kinit * kscreenlocker * plasma-workspace The attached patch resolves this issue on all our build boxes; additionally, applying it to my glibc builder did not change the already working result. BUG: 373175 Differential Revision: https://phabricator.kde.org/D8256 --- kde-modules/KDECompilerSettings.cmake | 3 +++ 1 file changed, 3 insertions(+) (limited to 'kde-modules/KDECompilerSettings.cmake') diff --git a/kde-modules/KDECompilerSettings.cmake b/kde-modules/KDECompilerSettings.cmake index 44358fb4..404d5415 100644 --- a/kde-modules/KDECompilerSettings.cmake +++ b/kde-modules/KDECompilerSettings.cmake @@ -140,6 +140,9 @@ if (UNIX) # implementation recognize it? _kde_add_platform_definitions(-D_LARGEFILE64_SOURCE) + # Non-glibc platforms need this since we specify -std=iso9899:1990 + _kde_add_platform_definitions(-D_XOPEN_SOURCE=600) + include(CheckCXXSourceCompiles) # By default (in glibc, at least), on 32bit platforms off_t is 32 bits, -- cgit v1.2.1