summaryrefslogtreecommitdiffstats
path: root/patches/hping3-20051105/host_vs_target.diff
blob: 59092f5b9668922e413c6dbc98be8d17b3c80cb4 (plain)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
Subject: Endianess detection should not happen at host side...
From: Juergen Beisert <jbe@pengutronix.de>

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>

---
 bytesex.h |    3 ++-
 configure |   20 ++------------------
 hping2.h  |    2 +-
 3 files changed, 5 insertions(+), 20 deletions(-)

Index: configure
===================================================================
--- configure.orig
+++ configure
@@ -15,30 +15,14 @@ fi
 
 CC=${CC:=cc}
 
-echo build byteorder.c...
-$CC byteorder.c -o byteorder || exit 1
-
 INSTALL_MANPATH=`echo $MANPATH|cut -f1 -d:`
 if [ "$INSTALL_MANPATH" = "" ]; then
 	INSTALL_MANPATH="/usr/local/man"
 fi
-BYTEORDER=`./byteorder -m`
-
-echo create byteorder.h...
-cat > byteorder.h <<EOF
-#ifndef __BYTEORDER_H
-#define __BYTEORDER_H
 
-EOF
-echo \#ifndef $BYTEORDER >> byteorder.h
-echo \#define $BYTEORDER >> byteorder.h
-echo \#endif /\* $BYTEORDER \*/ >> byteorder.h
-cat >> byteorder.h <<EOF
-
-#endif /* __BYTEORDER_H */
-EOF
+# CONFIGOSTYPE=`uname -s | tr [a-z] [A-Z]`
+CONFIGOSTYPE=LINUX
 
-CONFIGOSTYPE=`uname -s | tr [a-z] [A-Z]`
 if [ ! "$CONFIGOSTYPE" ]; then
 	CONFIGOSTYPE=UNKNOWN
 fi
Index: hping2.h
===================================================================
--- hping2.h.orig
+++ hping2.h
@@ -17,7 +17,7 @@
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <limits.h>
-#include "byteorder.h"
+#include <asm/byteorder.h>
 #include "systype.h"
 #include "fixtypes.h"
 
Index: bytesex.h
===================================================================
--- bytesex.h.orig
+++ bytesex.h
@@ -9,7 +9,8 @@
 
 #if 	defined(__i386__) \
 	|| defined(__alpha__) \
-	|| (defined(__mips__) && (defined(MIPSEL) || defined (__MIPSEL__)))
+	|| (defined(__mips__) && (defined(MIPSEL) || defined (__MIPSEL__))) \
+	|| defined(__ARMEL__)
 #define BYTE_ORDER_LITTLE_ENDIAN
 #elif 	defined(__mc68000__) \
 	|| defined (__sparc__) \