From 8f4094bb1c4d178df8ca13db828c76074d42d3ce Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Fri, 6 Dec 2019 14:30:14 +1100 Subject: [PATCH] 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 Reviewed-by: Eric Engestrom Part-of: (cherry picked from commit f9a7e6e854ddedafd3c85f7eaeca1a00ee7bced5) --- .pick_status.json | 2 +- meson.build | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index dc1f141cfb2..b136d4924ab 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -931,7 +931,7 @@ "description": "meson: build with _ISOC11_SOURCE on OpenBSD", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "e3a8013de8ca854d21225be00f123ccf63f9060f" }, diff --git a/meson.build b/meson.build index 291ae424850..4ee86381bbb 100644 --- a/meson.build +++ b/meson.build @@ -958,6 +958,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