From 25072b2381c1be08bb852ee85c7d5ffbbe4e017b Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Fri, 21 Oct 2016 16:41:10 -0700 Subject: [PATCH] AOSP: Fix mac build Disable linux-only features in config.h Fix one use of ino_t instead of ext2_ino_t. Test: mma -j Test: e2fsck -f -n $OUT/system.img Bug: 27599744 Change-Id: I3291ae888ac28a49813365ab2431a3c266de9907 From AOSP commit: bfa685deba9eb828b7ed35d6ccaf0345f6337ce3 Signed-off-by: Theodore Ts'o --- lib/ext2fs/bitops.h | 2 +- lib/ext2fs/gen_bitmap.c | 2 +- util/android_config.h | 8 ++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/ext2fs/bitops.h b/lib/ext2fs/bitops.h index bc59608..505b3c9 100644 --- a/lib/ext2fs/bitops.h +++ b/lib/ext2fs/bitops.h @@ -108,7 +108,7 @@ extern void ext2fs_unmark_block_bitmap_range(ext2fs_block_bitmap bitmap, extern int ext2fs_test_block_bitmap_range(ext2fs_block_bitmap bitmap, blk_t block, int num); extern int ext2fs_test_inode_bitmap_range(ext2fs_inode_bitmap bitmap, - ino_t inode, int num); + ext2_ino_t inode, int num); extern int ext2fs_mark_generic_bitmap(ext2fs_generic_bitmap bitmap, __u32 bitno); extern int ext2fs_unmark_generic_bitmap(ext2fs_generic_bitmap bitmap, diff --git a/lib/ext2fs/gen_bitmap.c b/lib/ext2fs/gen_bitmap.c index 6cd6fe6..d0061b8 100644 --- a/lib/ext2fs/gen_bitmap.c +++ b/lib/ext2fs/gen_bitmap.c @@ -564,7 +564,7 @@ int ext2fs_test_block_bitmap_range(ext2fs_block_bitmap bitmap, } int ext2fs_test_inode_bitmap_range(ext2fs_inode_bitmap bitmap, - ino_t inode, int num) + ext2_ino_t inode, int num) { EXT2_CHECK_MAGIC(bitmap, EXT2_ET_MAGIC_INODE_BITMAP); if ((inode < bitmap->start) || (inode+num-1 > bitmap->real_end)) { diff --git a/util/android_config.h b/util/android_config.h index b3c12a7..b3fd304 100644 --- a/util/android_config.h +++ b/util/android_config.h @@ -16,17 +16,23 @@ #define HAVE_GETPWUID_R 1 #define HAVE_INTPTR_T 1 #define HAVE_INTTYPES_H 1 +#ifdef __linux__ #define HAVE_LINUX_FD_H 1 #define HAVE_LSEEK64 1 #define HAVE_LSEEK64_PROTOTYPE 1 +#endif #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 +#ifdef __linux__ #define HAVE_PREAD64 1 +#endif #define HAVE_PWRITE 1 +#ifdef __linux__ #define HAVE_PWRITE64 1 +#endif #define HAVE_SETJMP_H 1 #define HAVE_SNPRINTF 1 #define HAVE_STDLIB_H 1 @@ -40,7 +46,9 @@ #define HAVE_SYS_MMAN_H 1 #define HAVE_SYS_MOUNT_H 1 #define HAVE_SYS_PARAM_H 1 +#ifdef __linux__ #define HAVE_SYS_PRCTL_H 1 +#endif #define HAVE_SYS_RESOURCE_H 1 #define HAVE_SYS_SELECT_H 1 #define HAVE_SYS_STAT_H 1 -- 1.8.3.1