]> Savannah Git Hosting - gnulib.git/commitdiff
getsubopt: Fix compilation error in C++ mode on Android.
authorBruno Haible <bruno@clisp.org>
Mon, 9 Jan 2023 16:24:14 +0000 (17:24 +0100)
committerBruno Haible <bruno@clisp.org>
Mon, 9 Jan 2023 16:24:14 +0000 (17:24 +0100)
* m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Use gl_CHECK_FUNCS_ANDROID
instead of AC_CHECK_FUNCS_ONCE.

ChangeLog
m4/getsubopt.m4

index b00197bbbf412bce66d07b080cecda1b6fc95cba..219d6c16a6c245a936e05248b3bcf47dbab479fa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-01-09  Bruno Haible  <bruno@clisp.org>
+
+       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  <bruno@clisp.org>
 
        malloc-h: Fix compilation errors in C++ mode on Android.
index 0753b1f64c6d21ca6c1886aa5ae1f6665c6d95a0..a528ec71430d0022f2adf649e08b15198375c255 100644 (file)
@@ -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 <stdlib.h>
+      #include <unistd.h>
+    ]])
   if test $ac_cv_func_getsubopt = no; then
     HAVE_GETSUBOPT=0
   fi