Fix build of forkfd_qt.cpp on FreeBSD
It no longer compiled after 614f37c8b5 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>
bb10
parent
cd1e045b3b
commit
eea7791fd4
|
|
@ -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"
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue