blob: 291ed3196be75fbeba805d73e462df1716e8e701 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001From 27910ea19260b7f7a3f9c0465addd1dea80cf3bd Mon Sep 17 00:00:00 2001
2From: Li Xin <lixin.fnst@cn.fujitsu.com>
3Date: Thu, 8 Oct 2015 15:11:17 +0900
4Subject: [PATCH] src: Fix error in cross-compile
5
6The errors are like this:
7tcptable.h:26:25: fatal error: linux/if_tr.h: No such file or directory
8ld: cannot find -ltextbox
9
10Upstream-Status: pending
11
12Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
13---
14 src/Makefile | 2 +-
15 src/hostmon.c | 2 +-
16 src/install.sh | 4 ++--
17 src/othptab.c | 2 +-
18 src/packet.c | 2 +-
19 src/tcptable.h | 2 +-
20 src/tr.c | 2 +-
21 support/Makefile | 3 +--
22 8 files changed, 9 insertions(+), 10 deletions(-)
23
24diff --git a/src/Makefile b/src/Makefile
25index 2043c2d..0f77bea 100644
26--- a/src/Makefile
27+++ b/src/Makefile
28@@ -39,7 +39,7 @@ LDOPTS = #-static
29 # you may want to change this to point to your ncurses include directory
30 # if the ncurses include files are not in the default location.
31
32-INCLUDEDIR = -I/usr/include/ncurses -I../support
33+INCLUDEDIR = -I../support
34
35 # You can uncomment this one to disable the backspace key in input fields.
36 # This means you must use the Del key or Ctrl+H combination to erase the
37diff --git a/src/hostmon.c b/src/hostmon.c
38index 14df2c8..6571562 100644
39--- a/src/hostmon.c
40+++ b/src/hostmon.c
41@@ -31,7 +31,7 @@ details.
42 #include <linux/if_packet.h>
43 #include <linux/if_ether.h>
44 #include <linux/if_fddi.h>
45-#include <linux/if_tr.h>
46+#include <netinet/if_tr.h>
47 #include <net/if_arp.h>
48 #include <stdlib.h>
49 #include <time.h>
50diff --git a/src/install.sh b/src/install.sh
51index d2fd360..36d3516 100755
52--- a/src/install.sh
53+++ b/src/install.sh
54@@ -23,9 +23,9 @@ echo
55 echo "*** Installing executable programs and preparing work directories"
56 echo
57 echo ">>> Installing iptraf in $TARGET"
58-$INSTALL -m 0700 -o root -g root -s iptraf $TARGET
59+$INSTALL -m 0700 -o root -g root iptraf $TARGET
60 echo ">>> Installing rvnamed in $TARGET"
61-$INSTALL -m 0700 -o root -g root -s rvnamed $TARGET
62+$INSTALL -m 0700 -o root -g root rvnamed $TARGET
63
64 if [ ! -d $WORKDIR ]; then
65 echo ">>> Creating IPTraf work directory $WORKDIR"
66diff --git a/src/othptab.c b/src/othptab.c
67index 97771d1..a8bb536 100644
68--- a/src/othptab.c
69+++ b/src/othptab.c
70@@ -18,7 +18,7 @@ details.
71
72 #include <asm/types.h>
73 #include <linux/if_ether.h>
74-#include <linux/if_tr.h>
75+#include <netinet/if_tr.h>
76 #include <linux/if_fddi.h>
77 #include <winops.h>
78 #include "arphdr.h"
79diff --git a/src/packet.c b/src/packet.c
80index 33fdf2a..1e2b81b 100644
81--- a/src/packet.c
82+++ b/src/packet.c
83@@ -36,7 +36,7 @@ details.
84 #include <linux/if_packet.h>
85 #include <linux/if_ether.h>
86 #include <linux/if_fddi.h>
87-#include <linux/if_tr.h>
88+#include <netinet/if_tr.h>
89 #include <linux/isdn.h>
90 #include <linux/sockios.h>
91 #include <msgboxes.h>
92diff --git a/src/tcptable.h b/src/tcptable.h
93index 3e17793..d1380b5 100644
94--- a/src/tcptable.h
95+++ b/src/tcptable.h
96@@ -23,7 +23,7 @@
97 #include <linux/if_packet.h>
98 #include <linux/if_ether.h>
99 #include <linux/if_fddi.h>
100-#include <linux/if_tr.h>
101+#include <netinet/if_tr.h>
102 #include <net/if.h>
103 #include <netinet/ip.h>
104 #include <netinet/udp.h>
105diff --git a/src/tr.c b/src/tr.c
106index 40c9e63..11f8045 100644
107--- a/src/tr.c
108+++ b/src/tr.c
109@@ -7,7 +7,7 @@
110 */
111
112 #include <asm/types.h>
113-#include <linux/if_tr.h>
114+#include <netinet/if_tr.h>
115 #include <netinet/in.h>
116
117 unsigned int get_tr_ip_offset(unsigned char *pkt)
118diff --git a/support/Makefile b/support/Makefile
119index 114bfc3..c962c09 100644
120--- a/support/Makefile
121+++ b/support/Makefile
122@@ -1,4 +1,3 @@
123-INCLUDEDIR = -I/usr/include/ncurses
124
125 OBJS = input.o menurt.o listbox.o winops.o labels.o \
126 msgboxes.o txbox.o
127@@ -12,7 +11,7 @@ libtextbox.a: $(OBJS)
128 # gcc -shared -o libtextbox.so $(OBJS)
129
130 %.o: %.c *.h
131- gcc -O2 -g -Wall -fPIC $(INCLUDEDIR) -c -o $*.o $<
132+ ${CC} -O2 -g -Wall -fPIC -c -o $*.o $<
133
134 clean:
135 rm -rf *.o *~ libtextbox.a libtextbox.so
136--
1371.8.4.2
138