summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/android_config.h71
-rwxr-xr-xutil/gen-android-files4
2 files changed, 46 insertions, 29 deletions
diff --git a/util/android_config.h b/util/android_config.h
index b3c12a7d..e6b25fa5 100644
--- a/util/android_config.h
+++ b/util/android_config.h
@@ -1,33 +1,23 @@
-/* work around bug in AndroidConfig.h */
-#ifdef HAVE_MALLOC_H
-#undef HAVE_MALLOC_H
+#ifndef __APPLE__
#define HAVE_MALLOC_H 1
#endif
#define ROOT_SYSCONFDIR "/etc"
+#define ENABLE_LIBSPARSE 1
+
#define DISABLE_BACKTRACE 1
#define HAVE_DIRENT_H 1
#define HAVE_ERRNO_H 1
-#define HAVE_EXT2_IOCTLS 1
-#define HAVE_FALLOCATE 1
#define HAVE_GETOPT_H 1
-#define HAVE_GETPAGESIZE 1
#define HAVE_GETPWUID_R 1
#define HAVE_INTPTR_T 1
#define HAVE_INTTYPES_H 1
-#define HAVE_LINUX_FD_H 1
-#define HAVE_LSEEK64 1
-#define HAVE_LSEEK64_PROTOTYPE 1
#define HAVE_MMAP 1
-#define HAVE_NETINET_IN_H 1
-#define HAVE_NET_IF_H 1
-#define HAVE_POSIX_MEMALIGN 1
-#define HAVE_PREAD 1
-#define HAVE_PREAD64 1
-#define HAVE_PWRITE 1
-#define HAVE_PWRITE64 1
#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
@@ -36,17 +26,44 @@
#define HAVE_STRNLEN 1
#define HAVE_STRPTIME 1
#define HAVE_SYSCONF 1
-#define HAVE_SYS_IOCTL_H 1
-#define HAVE_SYS_MMAN_H 1
-#define HAVE_SYS_MOUNT_H 1
-#define HAVE_SYS_PARAM_H 1
-#define HAVE_SYS_PRCTL_H 1
-#define HAVE_SYS_RESOURCE_H 1
-#define HAVE_SYS_SELECT_H 1
-#define HAVE_SYS_STAT_H 1
-#define HAVE_SYS_TIME_H 1
-#define HAVE_SYS_TYPES_H 1
-#define HAVE_SYS_WAIT_H 1
#define HAVE_TYPE_SSIZE_T 1
#define HAVE_UNISTD_H 1
#define HAVE_UTIME_H 1
+
+#define HAVE_SYS_STAT_H 1
+#define HAVE_SYS_TIME_H 1
+#define HAVE_SYS_TYPES_H 1
+
+#if defined(_WIN32)
+# define HAVE_LINUX_TYPES_H 1
+# define HAVE_WINSOCK_H 1
+#endif
+#if defined(__APPLE__) || defined(__linux__)
+# define HAVE_FCNTL 1
+# define HAVE_FSYNC 1
+# define HAVE_GETPAGESIZE 1
+# define HAVE_NET_IF_H 1
+# define HAVE_NETINET_IN_H 1
+# define HAVE_PREAD 1
+# define HAVE_PWRITE 1
+# define HAVE_POSIX_MEMALIGN 1
+# define HAVE_SYS_IOCTL_H 1
+# define HAVE_SYS_MMAN_H 1
+# define HAVE_SYS_MOUNT_H 1
+# define HAVE_SYS_PARAM_H 1
+# define HAVE_SYS_RESOURCE_H 1
+# define HAVE_SYS_SELECT_H 1
+# define HAVE_SYS_WAIT_H 1
+#endif
+#if defined(__linux__)
+# define HAVE_EXT2_IOCTLS 1
+# define HAVE_FALLOCATE 1
+# define HAVE_LINUX_FD_H 1
+# define HAVE_LINUX_TYPES_H 1
+# define HAVE_LSEEK64 1
+# define HAVE_LSEEK64_PROTOTYPE 1
+# define HAVE_PREAD64 1
+# define HAVE_PWRITE64 1
+# define HAVE_SYS_PRCTL_H 1
+# define HAVE_SYS_SYSMACROS_H 1
+#endif
diff --git a/util/gen-android-files b/util/gen-android-files
index ebd8778b..937496bc 100755
--- a/util/gen-android-files
+++ b/util/gen-android-files
@@ -7,7 +7,7 @@ ANDROID_GENERATED_FILES="lib/ext2fs/ext2_err.c lib/ext2fs/ext2_err.h \
lib/ext2fs/ext2_types.h lib/config.h lib/blkid/blkid.h \
lib/uuid/uuid.h lib/ext2fs/crc32c_table.h misc/default_profile.c \
lib/ss/std_rqs.c debugfs/debug_cmds.c debugfs/ro_debug_cmds.c \
- debugfs/extent_cmds.c debugfs/e2freefrag.c debugfs/create_inode.c \
+ debugfs/extent_cmds.c debugfs/e2freefrag.c \
debugfs/recovery.c debugfs/revoke.c \
MODULE_LICENSE_GPL README.version"
@@ -41,7 +41,7 @@ cp util/android_types.h lib/ext2fs/ext2_types.h
cp util/android_types.h lib/blkid/blkid_types.h
cp util/android_types.h lib/uuid/uuid_types.h
cp util/android_config.h lib/config.h
-cp misc/e2freefrag.c misc/create_inode.c debugfs/
+cp misc/e2freefrag.c debugfs/
cp e2fsck/recovery.c e2fsck/revoke.c debugfs/
gcc -o gen_crc32ctable lib/ext2fs/gen_crc32ctable.c