diff --git a/configure.ac b/configure.ac index b69b27ca5..743840d1b 100644 --- a/configure.ac +++ b/configure.ac @@ -862,6 +862,7 @@ AC_CHECK_FUNCS(getmntent_r setmntent endmntent hasmntopt getfsstat getvfsstat fa case $host_os in aix*) ac_cv_func_splice=no ;; esac # AIX splice() is something else AC_CHECK_FUNCS(splice) AC_CHECK_FUNCS(prlimit) +AC_CHECK_FUNCS(getauxval) # To avoid finding a compatibility unusable statfs, which typically # successfully compiles, but warns to use the newer statvfs interface: diff --git a/glib/gutils.c b/glib/gutils.c index 2b750aba9..e86aeca32 100644 --- a/glib/gutils.c +++ b/glib/gutils.c @@ -2503,7 +2503,7 @@ const gchar *g_get_tmp_dir_utf8 (void) { return g_get_tmp_dir (); } gboolean g_check_setuid (void) { -#if defined(HAVE_SYS_AUXV_H) +#if defined(HAVE_SYS_AUXV_H) && defined(HAVE_GETAUXVAL) && defined(AT_SECURE) unsigned long value; int errsv; diff --git a/meson.build b/meson.build index f2ffd9919..e642ae227 100644 --- a/meson.build +++ b/meson.build @@ -397,6 +397,7 @@ functions = [ 'fchown', 'fdwalk', 'fsync', + 'getauxval', 'getc_unlocked', 'getfsstat', 'getgrgid_r',