]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
build: fix missing declarations on Android
authorCollin Funk <collin.funk1@gmail.com>
Sun, 21 Sep 2025 20:40:18 +0000 (13:40 -0700)
committerCollin Funk <collin.funk1@gmail.com>
Sun, 21 Sep 2025 20:40:18 +0000 (13:40 -0700)
* configure.ac: Check for statx using gl_CHECK_FUNCS_ANDROID since it is
hidden for Android API level <= 30.
* m4/jm-macros.m4 (coreutils_MACROS): Check for syncfs using
gl_CHECK_FUNCS_ANDROID since it is hidden for Android API level <= 28.

configure.ac
m4/jm-macros.m4

index bcd41a71ca9b207e6e89c39fe38538dcbdeb3001..274eff42fc018efe0cfa48641f653a3900ac7e3a 100644 (file)
@@ -367,8 +367,8 @@ if test $ac_cv_func_getattrat = yes; then
   AC_SUBST([LIB_NVPAIR])
 fi
 
-# glibc >= 2.28 and linux kernel >= 4.11
-AC_CHECK_FUNCS([statx])
+# glibc >= 2.28 and linux kernel >= 4.11, Android API level 30.
+gl_CHECK_FUNCS_ANDROID([statx], [[#include <sys/stat.h>]])
 
 # SCO-ODT-3.0 is reported to need -los to link programs using initgroups
 AC_CHECK_FUNCS([initgroups])
index 883b596773a173d60f54662b471e27310c2ed7de..598c2476d59dceb9cecd1fe9953581fe851606a3 100644 (file)
@@ -71,11 +71,13 @@ AC_DEFUN([coreutils_MACROS],
     sethostname
     siginterrupt
     sync
-    syncfs
     sysinfo
     tcgetpgrp
   ])
 
+  # Android API level 30.
+  gl_CHECK_FUNCS_ANDROID([syncfs], [[#include <unistd.h>]])
+
   # These checks are for Interix, to avoid its getgr* functions, in favor
   # of these replacements.  The replacement functions are much more efficient
   # because they do not query the domain controller for user information