From 24b3161dc826844f2b9ae38fb0e979b036179b9c Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 9 Jan 2023 17:24:14 +0100 Subject: [PATCH] getsubopt: Fix compilation error in C++ mode on Android. * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Use gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS_ONCE. --- ChangeLog | 6 ++++++ m4/getsubopt.m4 | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b00197bbbf..219d6c16a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2023-01-09 Bruno Haible + + getsubopt: Fix compilation error in C++ mode on Android. + * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Use gl_CHECK_FUNCS_ANDROID + instead of AC_CHECK_FUNCS_ONCE. + 2023-01-09 Bruno Haible malloc-h: Fix compilation errors in C++ mode on Android. diff --git a/m4/getsubopt.m4 b/m4/getsubopt.m4 index 0753b1f64c..a528ec7143 100644 --- a/m4/getsubopt.m4 +++ b/m4/getsubopt.m4 @@ -1,4 +1,4 @@ -# getsubopt.m4 serial 5 +# getsubopt.m4 serial 6 dnl Copyright (C) 2004, 2007, 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, @@ -10,7 +10,10 @@ AC_DEFUN([gl_FUNC_GETSUBOPT], AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - AC_CHECK_FUNCS_ONCE([getsubopt]) + gl_CHECK_FUNCS_ANDROID([getsubopt], + [[#include + #include + ]]) if test $ac_cv_func_getsubopt = no; then HAVE_GETSUBOPT=0 fi -- 2.39.5