From f321df595150d01f3e8f60da8c6ff8372a91c650 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 18 Jan 2023 20:05:11 +0100 Subject: [PATCH 2/6] Fix warnings for functions introduced in Android API level 9. * m4/pipe2.m4 (gl_FUNC_PIPE2): Test for pipe2 using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. * m4/fdatasync.m4 (gl_FUNC_FDATASYNC): Update comments. --- ChangeLog | 7 +++++++ m4/fdatasync.m4 | 3 ++- m4/pipe2.m4 | 4 ++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index f314c07671..1b04e507fa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2023-01-18 Bruno Haible + + Fix warnings for functions introduced in Android API level 9. + * m4/pipe2.m4 (gl_FUNC_PIPE2): Test for pipe2 using + gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. + * m4/fdatasync.m4 (gl_FUNC_FDATASYNC): Update comments. + 2023-01-18 Bruno Haible Fix warnings for functions introduced in Android API level 8. diff --git a/m4/fdatasync.m4 b/m4/fdatasync.m4 index 8c5cc4fdaf..201d7ffb27 100644 --- a/m4/fdatasync.m4 +++ b/m4/fdatasync.m4 @@ -1,4 +1,4 @@ -# fdatasync.m4 serial 7 +# fdatasync.m4 serial 8 dnl Copyright (C) 2008-2023 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -17,6 +17,7 @@ AC_DEFUN([gl_FUNC_FDATASYNC], if test $ac_cv_have_decl_fdatasync = no; then HAVE_DECL_FDATASYNC=0 dnl Mac OS X 10.7 has fdatasync but does not declare it. + dnl Likewise Android with API level < 9. Cf. gl_CHECK_FUNCS_ANDROID. AC_CHECK_FUNCS([fdatasync]) if test $ac_cv_func_fdatasync = no; then HAVE_FDATASYNC=0 diff --git a/m4/pipe2.m4 b/m4/pipe2.m4 index 501f3a4303..c7ec02e873 100644 --- a/m4/pipe2.m4 +++ b/m4/pipe2.m4 @@ -1,4 +1,4 @@ -# pipe2.m4 serial 2 +# pipe2.m4 serial 3 dnl Copyright (C) 2009-2023 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -11,7 +11,7 @@ AC_DEFUN([gl_FUNC_PIPE2], dnl Persuade glibc to declare pipe2(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - AC_CHECK_FUNCS_ONCE([pipe2]) + gl_CHECK_FUNCS_ANDROID([pipe2], [[#include ]]) if test $ac_cv_func_pipe2 != yes; then HAVE_PIPE2=0 fi -- 2.34.1