summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlex Richardson <arichardson.kde@gmail.com>2015-03-15 21:50:37 +0000
committerRaphael Kubo da Costa <rakuco@FreeBSD.org>2015-03-15 22:26:40 +0000
commiteea7791fd481403ee7ed5897da95860909cac1d6 (patch)
treed0cd028ceff86b711eb8c52ca0406090d02a92dd /src
parentcd1e045b3bbf4b3e73baf1cbd60d5131d8691fd5 (diff)
Fix build of forkfd_qt.cpp on FreeBSD
It no longer compiled after 614f37c8b559a722538c58dd1f65229cfca7d35b due to the following: - forkfd_qt.cpp set _XOPEN_SOURCE to 500 - It then includes qatomic.h which include sys/cdefs.h (the FreeBSD header that parses and sets _POSIX_C_SOURCE, _XOPEN_SOURCE and other macros) - sys/cdefs.h redefines _POSIX_C_SOURCE to 199506 due to _XOPEN_SOURCE's value - Several libc symbols expected to exist by libc++ are hidden due to _POSIX_C_SOURCE's value and the build fails Setting _XOPEN_SOURCE to 700 ensures that _POSIX_C_SOURCE is set to 200809 which is required for libc++ to work correctly Task-number: QTBUG-45006 Change-Id: Iac93220d19ca5ab9ba8ac61a79748252283c3c47 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/forkfd/forkfd.c2
-rw-r--r--src/corelib/io/forkfd_qt.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/3rdparty/forkfd/forkfd.c b/src/3rdparty/forkfd/forkfd.c
index 3f9e82cd45..a8205065c5 100644
--- a/src/3rdparty/forkfd/forkfd.c
+++ b/src/3rdparty/forkfd/forkfd.c
@@ -38,7 +38,7 @@
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
# define _POSIX_C_SOURCE 200809L
-# define _XOPEN_SOURCE 500
+# define _XOPEN_SOURCE 700
#endif
#include "forkfd.h"
diff --git a/src/corelib/io/forkfd_qt.cpp b/src/corelib/io/forkfd_qt.cpp
index dadc42151c..6704ec6f2a 100644
--- a/src/corelib/io/forkfd_qt.cpp
+++ b/src/corelib/io/forkfd_qt.cpp
@@ -36,7 +36,7 @@
# define _POSIX_C_SOURCE 200809L
#endif
#if !defined(_XOPEN_SOURCE) && !defined(__QNXNTO__) && !defined(ANDROID)
-# define _XOPEN_SOURCE 500
+# define _XOPEN_SOURCE 700
#endif
#include <QtCore/qatomic.h>