From e2ddfccfb6f2ffd2bdd62f55de1b5f16fc936288 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Mon, 5 Dec 2016 13:29:49 -0800 Subject: [PATCH] AOSP: Fix "Can't use getmntent or getmntinfo to check for mounted filesystems!" warning. We do have and setmntent(3). Also silence unused parameter warnings; C programmers don't care, so upstream is unlikely to fix that. Bug: N/A Test: builds Change-Id: I57db0cca68a617913e21c2ef7b6613cd1183d7c5 From AOSP commit: d5947f70714e6676bca2663af210bfb9f6118e83 Signed-off-by: Theodore Ts'o --- lib/ext2fs/Android.mk | 2 +- util/android_config.h | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/ext2fs/Android.mk b/lib/ext2fs/Android.mk index fdb2a72..e248ffe 100644 --- a/lib/ext2fs/Android.mk +++ b/lib/ext2fs/Android.mk @@ -102,7 +102,7 @@ libext2fs_system_static_libraries := libc libext2fs_c_includes := external/e2fsprogs/lib -libext2fs_cflags := -O2 -g -W -Wall +libext2fs_cflags := -O2 -g -W -Wall -Wno-unused-parameter include $(CLEAR_VARS) diff --git a/util/android_config.h b/util/android_config.h index af370ff..a1c028f 100644 --- a/util/android_config.h +++ b/util/android_config.h @@ -1,8 +1,4 @@ -/* work around bug in AndroidConfig.h */ -#ifdef HAVE_MALLOC_H -#undef HAVE_MALLOC_H #define HAVE_MALLOC_H 1 -#endif #define ROOT_SYSCONFDIR "/etc" @@ -24,6 +20,7 @@ #define HAVE_LSEEK64_PROTOTYPE 1 #endif #define HAVE_MMAP 1 +#define HAVE_MNTENT_H 1 #define HAVE_NETINET_IN_H 1 #define HAVE_NET_IF_H 1 #define HAVE_POSIX_MEMALIGN 1 @@ -36,6 +33,7 @@ #define HAVE_PWRITE64 1 #endif #define HAVE_SETJMP_H 1 +#define HAVE_SETMNTENT 1 #define HAVE_SNPRINTF 1 #define HAVE_STDLIB_H 1 #define HAVE_STRCASECMP 1 -- 1.8.3.1