+2023-01-19 Bruno Haible <bruno@clisp.org>
+
+ Fix warnings for functions introduced in Android API level 29.
+ * m4/getloadavg.m4 (gl_GETLOADAVG): Test for getloadavg using
+ gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNC.
+
2023-01-19 Bruno Haible <bruno@clisp.org>
Fix warnings for functions introduced in Android API level 28.
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-#serial 10
+#serial 11
# Autoconf defines AC_FUNC_GETLOADAVG, but that is obsolescent.
# New applications should use gl_GETLOADAVG instead.
# getloadavg is present in libc on glibc >= 2.2, Mac OS X, FreeBSD >= 2.0,
# NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7.
HAVE_GETLOADAVG=1
-AC_CHECK_FUNC([getloadavg], [],
- [gl_func_getloadavg_done=no
+gl_CHECK_FUNCS_ANDROID([getloadavg], [[#include <stdlib.h>]])
+if test $ac_cv_func_getloadavg != yes; then
+ gl_func_getloadavg_done=no
# Some systems with -lutil have (and need) -lkvm as well, some do not.
# On Solaris, -lkvm requires nlist from -lelf, so check that first
AC_DEFINE([DGUX], [1], [Define to 1 for DGUX with <sys/dg_sys_info.h>.])
AC_CHECK_LIB([dgc], [dg_sys_info])])
fi
- fi])
+ fi
+fi
if test "x$gl_save_LIBS" = x; then
GETLOADAVG_LIBS=$LIBS