File android-tools-ppc64-types.patch of Package android-tools

Index: extras/ext4_utils/ext4_utils.c
===================================================================
--- extras.orig/ext4_utils/ext4_utils.c
+++ extras/ext4_utils/ext4_utils.c
@@ -402,8 +402,8 @@ u64 get_file_size(int fd)
 {
 	struct stat buf;
 	int ret;
-	u64 reserve_len = 0;
-	s64 computed_size;
+	__u64 reserve_len = 0;
+	__s64 computed_size;
 
 	ret = fstat(fd, &buf);
 	if (ret)
Index: extras/ext4_utils/ext4_utils.h
===================================================================
--- extras.orig/ext4_utils/ext4_utils.h
+++ extras/ext4_utils/ext4_utils.h
@@ -84,8 +84,13 @@ extern int force;
 #define __u16 u16
 #define __u8 u8
 
+#if defined(__powerpc64__)
+typedef unsigned long u64;
+typedef signed long s64;
+#else
 typedef unsigned long long u64;
 typedef signed long long s64;
+#endif
 typedef unsigned int u32;
 typedef unsigned short int u16;
 typedef unsigned char u8;
openSUSE Build Service is sponsored by