diff --git a/meson.build b/meson.build index c91bb64..e891d98 100644 --- a/meson.build +++ b/meson.build @@ -48,11 +48,9 @@ foreach x : [ 'elf-hints.h', 'glob.h', ] - x_exists = 0 if cc.has_header(x) - x_exists = 1 + probe_results.set('HAVE_' + x.to_upper().underscorify(), 1) endif - probe_results.set('HAS_' + x.to_upper().underscorify(), x_exists) endforeach configure_file( diff --git a/porting.h b/porting.h index 1ace55e..68e2b6c 100644 --- a/porting.h +++ b/porting.h @@ -40,36 +40,36 @@ #include #include #include "elf.h" -#if HAS_ALLOCA_H +#ifdef HAVE_ALLOCA_H # include #endif -#if HAS_SYS_PRCTL_H +#ifdef HAVE_SYS_PRCTL_H # include -# if HAS_LINUX_SECCOMP_H +# ifdef HAVE_LINUX_SECCOMP_H # include # endif -# if HAS_LINUX_SECUREBITS_H +# ifdef HAVE_LINUX_SECUREBITS_H # include # endif #endif -#if HAS_ENDIAN_H && HAS_BYTESWAP_H +#if defined(HAVE_ENDIAN_H) && defined(HAVE_BYTESWAP_H) # include # include -#elif HAS_SYS_ENDIAN_H +#elif defined(HAVE_SYS_ENDIAN_H) # include -#elif HAS_ISA_DEFS_H +#elif defined(HAVE_ISA_DEFS_H) # include -#elif HAS_MACHINE_ENDIAN_H +#elif defined(HAVE_MACHINE_ENDIAN_H) # include #endif -#ifdef HAS_GLOB_H +#ifdef HAVE_GLOB_H # include #endif #if defined(__GLIBC__) || defined(__UCLIBC__) || defined(__NetBSD__) # define __PAX_UTILS_DEFAULT_LD_CACHE_CONFIG "/etc/ld.so.conf" -#elif HAS_ELF_HINTS_H +#elif defined(HAVE_ELF_HINTS_H) # include # define __PAX_UTILS_DEFAULT_LD_CACHE_CONFIG _PATH_ELF_HINTS #else