Skip to contentSkip to conversation

byteorder.h patch

parisc-linux LaMont Jones 1 participant 1 message Jul 8, 2003

lore
Share & tools
lore
#0 lore raw

I guess I should have sent mail...

byteorder.h would try to use __u64 when it wasn't defined (__STRICT_ANSI__). This is fixed in revision 1.7 of include/asm-parisc/byteorder.h.

lamont

Index: include/asm-parisc/byteorder.h
===================================================================
RCS file: /var/cvs/linux/include/asm-parisc/byteorder.h,v retrieving revision 1.6
retrieving revision 1.7

asm-parisc/byteorder.h +4 -3
diff -u -r1.6 -r1.7
@@ -48,7 +48,8 @@
 	return x;
 }
 #define __arch__swab64(x) ___arch__swab64(x)
-#else
+#define __BYTEORDER_HAS_U64__
+#elif !defined(__STRICT_ANSI__)
 static __inline__ __const__ __u64 ___arch__swab64(__u64 x)
 {
 	__u32 t1 = (__u32) x;
@@ -57,12 +58,12 @@
 	___arch__swab32(t2);
 	return (((__u64) ___arch__swab32(t1) << 32) + ((__u64) ___arch__swab32(t2)));
 }
+#define __arch__swab64(x) ___arch__swab64(x)
+#define __BYTEORDER_HAS_U64__
 #endif
 
 #define __arch__swab16(x) ___arch__swab16(x)
 #define __arch__swab32(x) ___arch__swab32(x)
-#define __arch__swab64(x) ___arch__swab64(x)
-#define __BYTEORDER_HAS_U64__
 
 #endif /* __GNUC__ */