meson: add support for _DEFAULT_SOURCE

master
rentianyue-jk 2024-08-08 10:34:38 +08:00 committed by Ariadne Conill
parent 4697d636cc
commit 8c479a8355
1 changed files with 1 additions and 1 deletions

View File

@ -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