Skip to content

Commit

Permalink
meson: Set _GNU_SOURCE when checking reallocarray
Browse files Browse the repository at this point in the history
Otherwise the function is not detected when compiled with -Dc_std=c99.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
  • Loading branch information
ueno committed Aug 28, 2024
1 parent 5a79df4 commit 0992915
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0992915

Please sign in to comment.