Differential D3842 Diff 9279 head/devel/android-tools-fastboot/files/patch-ext4__utils_ext4__utils.c
Changeset View
Changeset View
Standalone View
Standalone View
head/devel/android-tools-fastboot/files/patch-ext4__utils_ext4__utils.c
Show All 12 Lines | |||||
+#elif defined(__Bitrig__) || defined(__NetBSD__) || defined(__OpenBSD__) | +#elif defined(__Bitrig__) || defined(__NetBSD__) || defined(__OpenBSD__) | ||||
+#include <sys/disklabel.h> | +#include <sys/disklabel.h> | ||||
+#include <sys/dkio.h> | +#include <sys/dkio.h> | ||||
+#elif defined(__DragonFly__) | +#elif defined(__DragonFly__) | ||||
+#include <sys/diskslice.h> | +#include <sys/diskslice.h> | ||||
#endif | #endif | ||||
#include "ext4.h" | #include "ext4.h" | ||||
@@ -53,6 +61,8 @@ struct sparse_file *ext4_sparse_file; | |||||
jmp_buf setjmp_env; | |||||
/* Definition from RFC-4122 */ | |||||
+/* XXX <sys/uuid.h> defines slightly different |struct uuid| */ | |||||
+#define uuid ext4_uuid | |||||
struct uuid { | |||||
u32 time_low; | |||||
u16 time_mid; | |||||
@@ -383,10 +391,24 @@ static u64 get_block_device_size(int fd) | @@ -383,10 +391,24 @@ static u64 get_block_device_size(int fd) | ||||
u64 size = 0; | u64 size = 0; | ||||
int ret; | int ret; | ||||
-#if defined(__linux__) | -#if defined(__linux__) | ||||
+#if defined(BLKGETSIZE64) | +#if defined(BLKGETSIZE64) | ||||
ret = ioctl(fd, BLKGETSIZE64, &size); | ret = ioctl(fd, BLKGETSIZE64, &size); | ||||
-#elif defined(__APPLE__) && defined(__MACH__) | -#elif defined(__APPLE__) && defined(__MACH__) | ||||
Show All 19 Lines |