From 09929154d768645cff1bcd24527fb2bf0c31ea04 Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Sun, 4 Aug 2024 13:05:03 +0900 Subject: [PATCH] meson: Set _GNU_SOURCE when checking reallocarray Otherwise the function is not detected when compiled with -Dc_std=c99. Signed-off-by: Daiki Ueno --- meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 788681bc..341d567f 100644 --- a/meson.build +++ b/meson.build @@ -360,7 +360,8 @@ conf.set10('HAVE_DECL_VASPRINTF', prefix: '#define _GNU_SOURCE')) conf.set10('HAVE_DECL_REALLOCARRAY', - cc.has_header_symbol('stdlib.h', 'reallocarray')) + cc.has_header_symbol('stdlib.h', 'reallocarray', + prefix: '#define _GNU_SOURCE')) # -------------------------------------------------------------------- # libffi