Whamcloud - gitweb
AOSP: Android: define HAVE_GETMNTINFO on macOS
authorEric Biggers <ebiggers@google.com>
Thu, 2 Feb 2023 22:42:19 +0000 (22:42 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 20 May 2024 15:11:45 +0000 (11:11 -0400)
macOS supports getmntinfo(), but not getmntent().  To match what the
'configure' script detects, define HAVE_GETMNTINFO to 1.

This prevents the following warning:

    #warning "Can't use getmntent or getmntinfo to check for mounted filesystems!"

Bug: 267448785
Change-Id: I3131563fc317fa9fef7745937ec2c4b09a1d29b0
From AOSP commit: bb6d46cc9770f4f15a5e52122a16f762c1bb567a

util/android_config.h

index 90b8f8a..c228860 100644 (file)
@@ -54,6 +54,9 @@
 # define HAVE_SYS_SELECT_H 1
 # define HAVE_SYS_WAIT_H 1
 #endif
+#ifdef __APPLE__
+# define HAVE_GETMNTINFO 1
+#endif
 #if defined(__linux__)
 # define HAVE_EXT2_IOCTLS 1
 # define HAVE_FALLOCATE 1