]> Savannah Git Hosting - gnulib.git/commitdiff
getdtablesize: Fix Android build
authorKevin Cernekee <cernekee@google.com>
Wed, 11 Feb 2015 23:22:51 +0000 (15:22 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 11 Feb 2015 23:47:44 +0000 (15:47 -0800)
* m4/getdtablesize.m4: Add Android case to host OS check.  Recent NDK
versions have this symbol in the .so library (at least 32-bit
platforms) but are missing the declaration in the header file,
causing the m4 logic to guess incorrectly.

ChangeLog
m4/getdtablesize.m4

index 35e9e4da19435c61b7fb4bf16b057d4c56a8064d..f38a67845c373503d8349b53f51733e2778029b8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
        test case passed when running on an Android host, and the code
        hasn't really changed since 2009.
 
+       getdtablesize: Fix Android build
+       * m4/getdtablesize.m4: Add Android case to host OS check.  Recent NDK
+       versions have this symbol in the .so library (at least 32-bit
+       platforms) but are missing the declaration in the header file,
+       causing the m4 logic to guess incorrectly.
+
 2015-02-08  Daiki Ueno  <ueno@gnu.org>
 
        uniname/unimame-tests: don't link with -lunistring
index a6b6c1b6c52c671e18619b555a6ced64767bb7ed..3ad204c35138189cf97fbed8c925c3fe0a23a414 100644 (file)
@@ -26,7 +26,9 @@ AC_DEFUN([gl_FUNC_GETDTABLESIZE],
         [gl_cv_func_getdtablesize_works=yes],
         [gl_cv_func_getdtablesize_works=no],
         [case "$host_os" in
-          cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
+          cygwin*|*-android*)
+          # on cygwin 1.5.25, getdtablesize() automatically grows
+          # on Android API level >= 21, the declaration is missing from unistd.h
             gl_cv_func_getdtablesize_works="guessing no" ;;
           *) gl_cv_func_getdtablesize_works="guessing yes" ;;
          esac])