From 8c479a8355d482fe5abd44e9003d47a4fc551a9c Mon Sep 17 00:00:00 2001 From: rentianyue-jk Date: Thu, 8 Aug 2024 10:34:38 +0800 Subject: [PATCH] meson: add support for _DEFAULT_SOURCE --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index dc39914..c5e2adc 100644 --- a/meson.build +++ b/meson.build @@ -31,7 +31,7 @@ check_functions = [ foreach f : check_functions name = f[0].to_upper().underscorify() - if cc.has_function(f[0], prefix : '#define _BSD_SOURCE\n#include <@0@>'.format(f[1])) and cc.has_header_symbol(f[1], f[0], prefix : '#define _BSD_SOURCE') + if cc.has_function(f[0], prefix : '#define _BSD_SOURCE\n#define _DEFAULT_SOURCE\n#include <@0@>'.format(f[1])) and cc.has_header_symbol(f[1], f[0], prefix : '#define _BSD_SOURCE\n#define _DEFAULT_SOURCE') cdata.set('HAVE_@0@'.format(name), 1) cdata.set('HAVE_DECL_@0@'.format(name), 1) else