]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
lib/ext2fs: don't warn about lack of getmntent on Windows
authorEric Biggers <ebiggers@google.com>
Sat, 28 Jan 2023 22:46:50 +0000 (14:46 -0800)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 30 Jan 2023 05:03:16 +0000 (00:03 -0500)
It is expected that Windows doesn't have getmntent(), so don't warn
about it.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/Android.bp
lib/ext2fs/ismounted.c

index eb4482d7967bed51998448004a86c36075f9899d..f5cbeec9f2e816928a4acb2ad1920f6e80ece6da 100644 (file)
@@ -121,7 +121,6 @@ cc_library {
             enabled: true,
             include_dirs: ["external/e2fsprogs/include/mingw"],
             cflags: [
-                "-Wno-error=cpp",
                 "-Wno-format",
                 "-Wno-unused-variable",
                 "-Wno-error=typedef-redefinition",
index fe64e8bb345a78846ce8a2d320530d43e60011dd..8fc0b99da4b80cd7cb45de85da98e29f4414accc 100644 (file)
@@ -408,7 +408,7 @@ errcode_t ext2fs_check_mount_point(const char *device, int *mount_flags,
 #ifdef HAVE_GETMNTINFO
                retval = check_getmntinfo(device, mount_flags, mtpt, mtlen);
 #else
-#ifdef __GNUC__
+#if defined(__GNUC__) && !defined(_WIN32)
  #warning "Can't use getmntent or getmntinfo to check for mounted filesystems!"
 #endif
                *mount_flags = 0;