File: 030_bytesex.diff

package info (click to toggle)
hping3 3.a2.ds2-10
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 2,068 kB
  • sloc: ansic: 11,628; sh: 129; makefile: 76
file content (28 lines) | stat: -rw-r--r-- 848 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Subject: Endianness fixes.
Author: Romain Francoise <rfrancoise@debian.org>
Last-Update: 2005-03-12
Bug-Debian: http://bugs.debian.org/283038

--- hping3-3.a2.ds1.orig/bytesex.h
+++ hping3-3.a2.ds1/bytesex.h
@@ -7,16 +7,11 @@
 #ifndef ARS_BYTESEX_H
 #define ARS_BYTESEX_H
 
-#if 	defined(__i386__) \
-	|| defined(__alpha__) \
-	|| (defined(__mips__) && (defined(MIPSEL) || defined (__MIPSEL__)))
+#include <endian.h>
+
+#if __BYTE_ORDER == __LITTLE_ENDIAN
 #define BYTE_ORDER_LITTLE_ENDIAN
-#elif 	defined(__mc68000__) \
-	|| defined (__sparc__) \
-	|| defined (__sparc) \
-	|| defined (__PPC__) \
-	|| defined (__BIG_ENDIAN__) \
-	|| (defined(__mips__) && (defined(MIPSEB) || defined (__MIPSEB__)))
+#elif __BYTE_ORDER == __BIG_ENDIAN
 #define BYTE_ORDER_BIG_ENDIAN
 #else
 # error can not find the byte order for this architecture, fix bytesex.h