aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorJin Qian <jinqian@google.com>2016-12-05 17:49:41 -0800
committerTheodore Ts'o <tytso@mit.edu>2017-05-23 22:34:18 -0400
commit43f927f7aa259c1deca0ec5855b1e5d23cb7f9e0 (patch)
tree02aeba38d52115d25d92f35ed09fa3c5bfe5d1a6 /util
parenta3d753f36f517d9fd98df5a5e51ed01361e6c997 (diff)
downloadandroid_external_e2fsprogs-43f927f7aa259c1deca0ec5855b1e5d23cb7f9e0.tar.gz
android_external_e2fsprogs-43f927f7aa259c1deca0ec5855b1e5d23cb7f9e0.tar.bz2
android_external_e2fsprogs-43f927f7aa259c1deca0ec5855b1e5d23cb7f9e0.zip
Fix windows and mac build
malloc.h is not available on mac. mntent.h and setmntent are not available on windows. Test: cd external/e2fsprogs && mm Change-Id: I3bc1b80156d3659f4d81975626a71f58d39ee61a (cherry picked from commit 8ca6180b52349968daf601bd89e15491eb2f271f)
Diffstat (limited to 'util')
-rw-r--r--util/android_config.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/util/android_config.h b/util/android_config.h
index a1c028f6..bcf81229 100644
--- a/util/android_config.h
+++ b/util/android_config.h
@@ -1,4 +1,6 @@
+#ifndef __APPLE__
#define HAVE_MALLOC_H 1
+#endif
#define ROOT_SYSCONFDIR "/etc"
@@ -20,7 +22,9 @@
#define HAVE_LSEEK64_PROTOTYPE 1
#endif
#define HAVE_MMAP 1
+#ifdef __linux__
#define HAVE_MNTENT_H 1
+#endif
#define HAVE_NETINET_IN_H 1
#define HAVE_NET_IF_H 1
#define HAVE_POSIX_MEMALIGN 1
@@ -33,7 +37,9 @@
#define HAVE_PWRITE64 1
#endif
#define HAVE_SETJMP_H 1
+#ifdef __linux__
#define HAVE_SETMNTENT 1
+#endif
#define HAVE_SNPRINTF 1
#define HAVE_STDLIB_H 1
#define HAVE_STRCASECMP 1