Skip to contentSkip to conversation

xfstests: fix compile error of src/fssum.c on bigendian host

PATCH Superseded Eryu Guan 3 participants 3 messages Oct 30, 2013 – Oct 31, 2013

lore
Share & tools
lore

Eryu Guan

author
#0 lore raw

PATCH 1/1 xfstests: fix compile error of src/fssum.c on bigendian host

Definition of htonll() is needed on bigendian host too, otherwise src/fssum.c won't compile on ppc64/s390x hosts.

---
 src/fssum.c | 2 ++
 1 file changed, 2 insertions(+)
src/fssum.c +2 -0
index c75ff8b..c26d32b 100644
@@ -50,6 +50,8 @@
 
 #if __BYTE_ORDER == __LITTLE_ENDIAN
 #define htonll(x)     __bswap_64 (x)
+#else
+#define htonll(x)     (x)
 #endif
 #endif
 
Signature · 6 lines
1.8.3.1

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Acked-by on v1 1/1
#1 lore raw
Quoted 13 lines · Eryu Guan

Definition of htonll() is needed on bigendian host too, otherwise src/fssum.c won't compile on ppc64/s390x hosts.

---
 src/fssum.c | 2 ++
 1 file changed, 2 insertions(+)
src/fssum.c +0 -0
index c75ff8b..c26d32b 100644

src/fssum.c line 56

Quoted 7 lines
src/fssum.c +2 -0
@@ -50,6 +50,8 @@
 
 #if __BYTE_ORDER == __LITTLE_ENDIAN
 #define htonll(x)     __bswap_64 (x)
+#else
+#define htonll(x)     (x)
 #endif
 #endif

Looks fine.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Reviewed-by on v1 1/1
#2 lore raw
In reply to Eryu Guan

Looks good,

Quoted 28 lines · Eryu Guan

Definition of htonll() is needed on bigendian host too, otherwise src/fssum.c won't compile on ppc64/s390x hosts.

---
 src/fssum.c | 2 ++
 1 file changed, 2 insertions(+)
src/fssum.c +2 -0
index c75ff8b..c26d32b 100644
@@ -50,6 +50,8 @@
 
 #if __BYTE_ORDER == __LITTLE_ENDIAN
 #define htonll(x)     __bswap_64 (x)
+#else
+#define htonll(x)     (x)
 #endif
 #endif
 
Signature · 6 lines
1.8.3.1

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Signature · 6 lines
Carlos

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs