From ef7b2c9a343b17c1dcef7ef3ffcae27b073e8895 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 13 Oct 2024 16:45:34 -0700 Subject: [PATCH] build: define __EXTENSIONS__ when building on Solaris & illumos Like _GNU_SOURCE on glibc, this tells the header to define functions not included in the requested standards versions. This is needed to build glib/tests/utils-c-89 with -std=c89 and utils-c-89 with -std=c99 and still be able to call functions like isnan() and realpath(). Signed-off-by: Alan Coopersmith --- meson.build | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meson.build b/meson.build index 5969c5465..8836c26d2 100644 --- a/meson.build +++ b/meson.build @@ -237,6 +237,8 @@ add_project_arguments('-D_GNU_SOURCE', language: 'c') if host_system == 'qnx' add_project_arguments('-D_QNX_SOURCE', language: 'c') +elif host_system == 'sunos' + add_project_arguments('-D__EXTENSIONS__', language: 'c') endif # dummy/empty dependency() object to declare fallbacks and simpler dependencies