--- util-linux-2.40.2/configure.ac.orig	2025-02-06 12:16:44.703837700 -0800
+++ util-linux-2.40.2/configure.ac	2025-02-06 12:31:39.213071600 -0800
@@ -1510,8 +1510,6 @@
   [], [UL_DEFAULT_ENABLE([fallocate], [check])]
 )
 UL_BUILD_INIT([fallocate])
-UL_REQUIRES_SYSCALL_CHECK([fallocate], [UL_CHECK_SYSCALL([fallocate])])
-AM_CONDITIONAL([BUILD_FALLOCATE], [test "x$build_fallocate" = xyes])
 
 AS_IF([test "x$build_fallocate" = xyes], [
   dnl check for valid fallocate() function
@@ -1542,7 +1540,9 @@
    }
    ]])],[
   AC_MSG_RESULT([yes])
+  have_fallocate=yes
   AC_DEFINE([HAVE_FALLOCATE], [1], [Have valid fallocate() function])],[
+  have_fallocate=no
   AC_MSG_RESULT([no])])
 ])
 
@@ -1570,9 +1570,13 @@
    }
    ]])],[
   AC_MSG_RESULT([yes])
+  have_posix_fallocate=yes
   AC_DEFINE([HAVE_POSIX_FALLOCATE], [1], [Have valid posix_fallocate() function])],[
+  have_posix_fallocate=no
   AC_MSG_RESULT([no])])
 ])
+UL_REQUIRES_HAVE([fallocate], [fallocate, posix_fallocate], [fallocate or posix_fallocate function])
+AM_CONDITIONAL([BUILD_FALLOCATE], [test "x$build_fallocate" = xyes])
 
 
 AC_ARG_ENABLE([unshare],
