From: Bruno Haible Date: Thu, 19 Jan 2023 20:55:39 +0000 (+0100) Subject: Fix warnings for functions introduced in Android API level 29. X-Git-Tag: v1.0~1801 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=de6c4c2e06f19df6789d94f52c26b7caa58cb711;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index 081efd1494..cae9026535 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2023-01-19 Bruno Haible + + 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 Fix warnings for functions introduced in Android API level 28. diff --git a/m4/getloadavg.m4 b/m4/getloadavg.m4 index 79e420baae..067f142abc 100644 --- a/m4/getloadavg.m4 +++ b/m4/getloadavg.m4 @@ -7,7 +7,7 @@ # 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. @@ -25,8 +25,9 @@ gl_save_LIBS=$LIBS # 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 ]]) +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 @@ -73,7 +74,8 @@ AC_CHECK_FUNC([getloadavg], [], AC_DEFINE([DGUX], [1], [Define to 1 for DGUX with .]) AC_CHECK_LIB([dgc], [dg_sys_info])]) fi - fi]) + fi +fi if test "x$gl_save_LIBS" = x; then GETLOADAVG_LIBS=$LIBS