From cfd4bf3d7d6b982106ff0b4cc902a24791866c64 Mon Sep 17 00:00:00 2001 From: peelz Date: Fri, 17 May 2024 13:14:42 -0400 Subject: [PATCH] Fix duplicate feature test macros --- meson.build | 7 +++---- src/polkitbackend/meson.build | 2 -- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index b5112aab..f5d3cac2 100644 --- a/meson.build +++ b/meson.build @@ -82,9 +82,6 @@ foreach define: set_defines config_data.set_quoted(define[0], define[1]) endforeach -# Globally define_GNU_SOURCE and therefore enable the GNU extensions -config_data.set('_GNU_SOURCE', true) - # functions check_functions = [ 'clearenv', @@ -96,7 +93,9 @@ foreach func: check_functions config_data.set('HAVE_' + func.to_upper(), cc.has_function(func)) endforeach -compiler_common_flags = [] +compiler_common_flags = [ + '-D_GNU_SOURCE', +] compiler_c_flags = [ # FIXME: this should go as 'c_std=c99' in project's default_options. # https://github.com/mesonbuild/meson/issues/1889 diff --git a/src/polkitbackend/meson.build b/src/polkitbackend/meson.build index c35e6c2f..b885f954 100644 --- a/src/polkitbackend/meson.build +++ b/src/polkitbackend/meson.build @@ -29,8 +29,6 @@ c_flags = [ '-D_POLKIT_BACKEND_COMPILATION', '-DPACKAGE_DATA_DIR="@0@"'.format(pk_prefix / pk_datadir), '-DPACKAGE_SYSCONF_DIR="@0@"'.format(pk_prefix / pk_sysconfdir), - '-D_XOPEN_SOURCE=700', - '-D_GNU_SOURCE=1', ] if js_engine == 'duktape'