summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorTing-Wei Lan <lantw@src.gnome.org>2020-05-03 17:42:41 +0800
committerTing-Wei Lan <lantw@src.gnome.org>2020-05-03 17:42:41 +0800
commit013052714d8ec74f16b8a035faa35a437c590636 (patch)
tree16510b453d33ebb0d1ccd27b419d9dd67d9156c7 /meson.build
parentdd3aa9ed64a0a370c8150f98e849ffc6e73da827 (diff)
downloadgdk-pixbuf-013052714d8ec74f16b8a035faa35a437c590636.tar.gz
build: Bump _XOPEN_SOURCE to 700
On FreeBSD, macros such as _POSIX_C_SOURCE and _XOPEN_SOURCE are used as a means to disable features instead of enabling features. Therefore, setting a macro to a value which is too small can make required features become unavailable. Commit f57bec3322921631c322b7d151fb129125b9d80d sets _XOPEN_SOURCE to 500 and causes compilation errors on FreeBSD because of missing C99 support. FreeBSD libc automatically sets _POSIX_C_SOURCE to 199506 when _XOPEN_SOURCE is set to 500. Since 1995 < 1999, this also means all C99 functions are disabled. To fix it, use a value matching the current definition of _POSIX_C_SOURCE=200809, which is _XOPEN_SOURCE=700.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build2
1 files changed, 1 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index c172b95de..bd4f0dff6 100644
--- a/meson.build
+++ b/meson.build
@@ -8,7 +8,7 @@ project('gdk-pixbuf', 'c',
],
meson_version: '>= 0.48.0')
-add_project_arguments([ '-D_POSIX_C_SOURCE=200809L', '-D_DEFAULT_SOURCE', '-D_XOPEN_SOURCE=500' ], language: 'c')
+add_project_arguments([ '-D_POSIX_C_SOURCE=200809L', '-D_DEFAULT_SOURCE', '-D_XOPEN_SOURCE=700' ], language: 'c')
cc = meson.get_compiler('c')
host_system = host_machine.system()