--- gnutls/gl/canonicalize-lgpl.c.orig	2024-01-16 10:15:15.000000000 +0100
+++ gnutls/gl/canonicalize-lgpl.c	2024-11-18 09:49:49.355493000 +0100
@@ -100,7 +100,13 @@
 static bool
 file_accessible (char const *file)
 {
-# if defined _LIBC || HAVE_FACCESSAT
+# if defined(__APPLE__)
+  if (__builtin_available(macOS 10.10, iOS 8.0, *)) {
+  return faccessat (AT_FDCWD, file, F_OK, AT_EACCESS) == 0;
+  }
+  struct stat st;
+  return stat (file, &st) == 0 || errno == EOVERFLOW;
+# elif defined _LIBC || HAVE_FACCESSAT
   return __faccessat (AT_FDCWD, file, F_OK, AT_EACCESS) == 0;
 # else
   struct stat st;
