diff options
author | Ting-Wei Lan <lantw@src.gnome.org> | 2017-06-06 00:10:06 +0800 |
---|---|---|
committer | Ting-Wei Lan <lantw@src.gnome.org> | 2017-06-06 00:10:06 +0800 |
commit | 1089e4cca5c3f82b6088dc945eef9badfefff149 (patch) | |
tree | 2f5bd36e5d80d32bfd14786f7687dd95a41dc397 /meson.build | |
parent | 2b3ccd094a2884f23efc9c6307fb958f870e0fb0 (diff) | |
download | gnome-screenshot-1089e4cca5c3f82b6088dc945eef9badfefff149.tar.gz |
build: Define both _POSIX_C_SOURCE and _XOPEN_SOURCE with versions
FreeBSD libc assumes defining _POSIX_C_SOURCE without specifying a
version means a pre-C89 environment with the oldest version of POSIX
standard, IEEE Std 1003.1-1988. Defining _POSIX_C_SOURCE without
defining _XOPEN_SOURCE also causes XSI to be disabled. However, M_PI
constant is only available in XSI. Therefore, we have to define
_XOPEN_SOURCE if we want to define _POSIX_C_SOURCE.
https://bugzilla.gnome.org/show_bug.cgi?id=783442
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meson.build b/meson.build index 66bb84c..7927cb0 100644 --- a/meson.build +++ b/meson.build @@ -8,7 +8,7 @@ project('gnome-screenshot', 'c', 'c_std=c99', ]) -add_project_arguments([ '-D_POSIX_C_SOURCE', '-D_DEFAULT_SOURCE' ], language: 'c') +add_project_arguments([ '-D_POSIX_C_SOURCE=200809L', '-D_XOPEN_SOURCE=700', '-D_DEFAULT_SOURCE' ], language: 'c') cc = meson.get_compiler('c') |