path: root/src/corelib/io
diff options
authorAlex Richardson <>2015-03-15 21:50:37 +0000
committerRaphael Kubo da Costa <>2015-03-15 22:26:40 +0000
commiteea7791fd481403ee7ed5897da95860909cac1d6 (patch)
treed0cd028ceff86b711eb8c52ca0406090d02a92dd /src/corelib/io
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 <>
Diffstat (limited to 'src/corelib/io')
1 files changed, 1 insertions, 1 deletions
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
#if !defined(_XOPEN_SOURCE) && !defined(__QNXNTO__) && !defined(ANDROID)
-# define _XOPEN_SOURCE 500
+# define _XOPEN_SOURCE 700
#include <QtCore/qatomic.h>