From c4c002d1ca80bd69776387dafb9c5bb082c72e48 Mon Sep 17 00:00:00 2001 From: Peter Harris Date: Tue, 9 May 2017 19:39:46 -0400 Subject: [PATCH] meson: Only detect each function once Use conf_data outside of include/ to avoid re-running detection of the same functions. Reviewed-by: Eric Anholt Signed-off-by: Peter Harris --- os/meson.build | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/os/meson.build b/os/meson.build index 724e6d1a8..940c6f4d0 100644 --- a/os/meson.build +++ b/os/meson.build @@ -21,32 +21,32 @@ srcs_os = [ # Wrapper code for missing C library functions srcs_libc = [] -if not cc.has_function('reallocarray') +if not conf_data.get('HAVE_REALLOCARRAY') srcs_libc += 'reallocarray.c' endif -if not cc.has_function('strcasecmp') +if not conf_data.get('HAVE_STRCASECMP') srcs_libc += 'strcasecmp.c' endif -if not cc.has_function('strcasestr') +if not conf_data.get('HAVE_STRCASESTR') srcs_libc += 'strcasestr.c' endif -if not cc.has_function('strlcat') +if not conf_data.get('HAVE_STRLCAT') srcs_libc += 'strlcat.c' endif -if not cc.has_function('strlcpy') +if not conf_data.get('HAVE_STRLCPY') srcs_libc += 'strlcpy.c' endif -if not cc.has_function('strndup') +if not conf_data.get('HAVE_STRNDUP') srcs_libc += 'strndup.c' endif -if not cc.has_function('timingsafe_memcmp') +if not conf_data.get('HAVE_TIMINGSAFE_MEMCMP') srcs_libc += 'timingsafe_memcmp.c' endif -if not cc.has_function('poll') +if not conf_data.get('HAVE_POLL') srcs_os += 'xserver_poll.c' endif -if cc.has_function('sigaction') +if conf_data.get('BUSFAULT') srcs_os += 'busfault.c' endif