Mesa (master): meson: build with _ISOC11_SOURCE on OpenBSD

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Aug 31 09:28:27 UTC 2020


Module: Mesa
Branch: master
Commit: f9a7e6e854ddedafd3c85f7eaeca1a00ee7bced5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f9a7e6e854ddedafd3c85f7eaeca1a00ee7bced5

Author: Jonathan Gray <jsg at jsg.id.au>
Date:   Fri Dec  6 14:30:14 2019 +1100

meson: build with _ISOC11_SOURCE on OpenBSD

Mesa builds with -std=c99 but uses timespec_get() a c11 function.
Build with _ISOC11_SOURCE for c11 visibility when -std is specified.
On linux c11 visibility comes from defining _GNU_SOURCE.

Fixes: e3a8013de8c ("util/u_queue: add util_queue_fence_wait_timeout")
Signed-off-by: Jonathan Gray <jsg at jsg.id.au>
Reviewed-by: Eric Engestrom <eric at engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5630>

---

 meson.build | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meson.build b/meson.build
index 2c3397d673e..661a01e82b4 100644
--- a/meson.build
+++ b/meson.build
@@ -949,6 +949,8 @@ elif host_machine.system() == 'windows'
   else
     pre_args += ['-D__MSVCRT_VERSION__=0x0700']
   endif
+elif host_machine.system() == 'openbsd'
+  pre_args += '-D_ISOC11_SOURCE'
 endif
 
 # Check for generic C arguments



More information about the mesa-commit mailing list