From 71974d8c54852c6afd21e20aabe90916c2d9d60f Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Fri, 29 Jul 2022 10:18:59 -0700 Subject: [PATCH] meson: Add _BSD_SOURCE and _DEFAULT_SOURCE To avoid warnings about string functions like strdup which are otherwise undefined, but succeed at linking anyway when the C standard is c99. --- meson.build | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meson.build b/meson.build index 724ac27..2307f24 100644 --- a/meson.build +++ b/meson.build @@ -6,6 +6,11 @@ project('pkgconf', 'c', cc = meson.get_compiler('c') +add_project_arguments( + '-D_BSD_SOURCE', + '-D_DEFAULT_SOURCE', + language : 'c', +) cdata = configuration_data()