From f7bebba664e4a12a9b4adb936272a039606c94d1 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Mon, 24 Apr 2023 15:50:00 +0200 Subject: [PATCH] fix meson.build Co-authored-by: Ariadne Conill --- libpkgconf/config.h.meson | 12 ++++++++++++ meson.build | 6 +++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/libpkgconf/config.h.meson b/libpkgconf/config.h.meson index 74af731..406f283 100644 --- a/libpkgconf/config.h.meson +++ b/libpkgconf/config.h.meson @@ -12,6 +12,18 @@ /* Define to 1 if you have the `reallocarray' function. */ #mesondefine HAVE_REALLOCARRAY +/* Define to 1 if you have the `strlcat' function. */ +#mesondefine HAVE_DECL_STRLCAT + +/* Define to 1 if you have the `strlcpy' function. */ +#mesondefine HAVE_DECL_STRLCPY + +/* Define to 1 if you have the `strndup' function. */ +#mesondefine HAVE_DECL_STRNDUP + +/* Define to 1 if you have the `reallocarray' function. */ +#mesondefine HAVE_DECL_REALLOCARRAY + /* Name of package */ #mesondefine PACKAGE diff --git a/meson.build b/meson.build index a629073..0a9b9b1 100644 --- a/meson.build +++ b/meson.build @@ -30,8 +30,12 @@ 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') - cdata.set('HAVE_@0@'.format(f[0].to_upper().underscorify()), 1) + cdata.set('HAVE_@0@'.format(name), 1) + cdata.set('HAVE_DECL_@0@'.format(name), 1) + else + cdata.set('HAVE_DECL_@0@'.format(name), 0) endif endforeach