summaryrefslogtreecommitdiffstats
path: root/obsolete-buildroot/sources/openwrt/patches/ppp/z01_ppp-2.4.2-openwrt.patch
blob: e77b004418b1387c0e12da7fdc05c38665bfd5b3 (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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
diff -ruN ppp-2.4.2-old/chat/Makefile.linux ppp-2.4.2-new/chat/Makefile.linux
--- ppp-2.4.2-old/chat/Makefile.linux	2004-01-13 04:57:55.000000000 +0100
+++ ppp-2.4.2-new/chat/Makefile.linux	2004-08-23 12:48:50.000000000 +0200
@@ -6,8 +6,9 @@
 CDEF4=	-DFNDELAY=O_NDELAY		# Old name value
 CDEFS=	$(CDEF1) $(CDEF2) $(CDEF3) $(CDEF4)
 
-COPTS=	-O2 -g -pipe $(CDEFS)
-CFLAGS=	$(COPTS) $(CDEFS)
+COPTS = -O2
+COMPILE_FLAGS = $(CDEFS)
+CFLAGS = $(COPTS) $(COMPILE_FLAGS)
 
 INSTALL= install
 
diff -ruN ppp-2.4.2-old/pppd/Makefile.linux ppp-2.4.2-new/pppd/Makefile.linux
--- ppp-2.4.2-old/pppd/Makefile.linux	2003-11-27 22:55:19.000000000 +0100
+++ ppp-2.4.2-new/pppd/Makefile.linux	2004-08-23 12:48:50.000000000 +0200
@@ -47,19 +47,19 @@
 # Uncomment the next line to include support for PPP packet filtering.
 # This requires that the libpcap library and headers be installed
 # and that the kernel driver support PPP packet filtering.
-FILTER=y
+#FILTER=y
 
 # Uncomment the next line to enable multilink PPP (enabled by default)
 # Linux distributions: Please leave multilink ENABLED in your builds
 # of pppd!
-HAVE_MULTILINK=y
+#HAVE_MULTILINK=y
 
 # Uncomment the next line to enable the TDB database (enabled by default.)
 # If you enable multilink, then TDB is automatically enabled also.
 # Linux distributions: Please leave TDB ENABLED in your builds.
-USE_TDB=y
+#USE_TDB=y
 
-HAS_SHADOW=y
+#HAS_SHADOW=y
 #USE_PAM=y
 #HAVE_INET6=y
 
@@ -76,7 +76,7 @@
 
 INCLUDE_DIRS= -I../include
 
-COMPILE_FLAGS= -DHAVE_PATHS_H -DIPX_CHANGE -DHAVE_MMAP
+COMPILE_FLAGS= -DHAVE_PATHS_H
 
 CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS)
 
@@ -192,7 +192,7 @@
      CFLAGS += -DMAXOCTETS
 endif
 
-INSTALL= install -o root
+INSTALL= install
 
 all: $(TARGETS)
 
diff -ruN ppp-2.4.2-old/pppd/plugins/Makefile.linux ppp-2.4.2-new/pppd/plugins/Makefile.linux
--- ppp-2.4.2-old/pppd/plugins/Makefile.linux	2004-01-13 04:56:24.000000000 +0100
+++ ppp-2.4.2-new/pppd/plugins/Makefile.linux	2004-08-23 12:48:50.000000000 +0200
@@ -1,12 +1,16 @@
-CC	= gcc
-COPTS	= -O2 -g
-CFLAGS	= $(COPTS) -I.. -I../../include -fPIC
-LDFLAGS	= -shared
-INSTALL	= install -o root
+#CC = gcc
+COPTS = -O2
+COMPILE_FLAGS = -I.. -I../../include -fPIC
+LIBS =
+
+INSTALL = install
+
+CFLAGS = $(COPTS) $(COMPILE_FLAGS)
+LDFLAGS = -shared
 
 SUBDIRS := rp-pppoe
 # Uncomment the next line to include the radius authentication plugin
-# SUBDIRS += radius
+SUBDIRS += radius
 PLUGINS := minconn.so passprompt.so passwordfd.so
 
 # include dependencies if present
diff -ruN ppp-2.4.2-old/pppd/plugins/radius/Makefile.linux ppp-2.4.2-new/pppd/plugins/radius/Makefile.linux
--- ppp-2.4.2-old/pppd/plugins/radius/Makefile.linux	2002-11-09 12:24:42.000000000 +0100
+++ ppp-2.4.2-new/pppd/plugins/radius/Makefile.linux	2004-08-23 12:57:38.000000000 +0200
@@ -5,7 +5,12 @@
 
 MANDIR=/usr/man
 PLUGIN=radius.so radattr.so radrealms.so
-CFLAGS=-I../.. -I../../../include -Iradiusclient/include -O2
+COPTS = -O2
+COMPILE_FLAGS = -I../.. -I../../../include -Iradiusclient/include -fPIC
+LIBS=
+
+CFLAGS=$(COPTS) $(COMPILE_FLAGS)
+LDFLAGS=-lradiusclient
 
 # Uncomment the next line to include support for Microsoft's
 # MS-CHAP authentication protocol.
@@ -37,29 +42,34 @@
 	$(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR)/man8
 
 radius.so: radiusclient/lib/.libs/libradiusclient.a radius.o
-	gcc -o radius.so -shared radius.o radiusclient/lib/.libs/libradiusclient.a
+	$(CC) -o radius.so -shared radius.o radiusclient/lib/.libs/libradiusclient.a
 
 radattr.so: radattr.o
-	gcc -o radattr.so -shared radattr.o
+	$(CC) -o radattr.so -shared radattr.o
 
 radrealms.so: radrealms.o
-	gcc -o radrealms.so -shared radrealms.o
+	$(CC) -o radrealms.so -shared radrealms.o
 
 radius.o: radius.c
-	gcc $(CFLAGS) -c -o radius.o -fPIC radius.c
+	$(CC) -c $(CFLAGS) radius.c -o radius.o
 
 radattr.o: radattr.c
-	gcc $(CFLAGS) -c -o radattr.o -fPIC radattr.c
+	$(CC) -c $(CFLAGS) radattr.c -o radattr.o
 
 radrealms.o: radrealms.c
-	gcc $(CFLAGS) -c -o radrealms.o -fPIC radrealms.c
+	$(CC) -c $(CFLAGS) radrealms.c -o radrealms.o
 
 radiusclient/lib/.libs/libradiusclient.a:
 	test -r radiusclient/Makefile ||           \
 		(cd radiusclient;                  \
+		rm -f config.cache ; \
+		aclocal ; \
+		autoconf ; \
+		ac_cv_func_setvbuf_reversed=no \
+		ac_cv_func_uname=no \
 		 ./configure --prefix=/usr         \
 			     --sysconfdir=/etc     \
-			     --enable-shared       \
+			     --disable-shared       \
 			     --enable-static)
 	$(MAKE) -C radiusclient
 
diff -ruN ppp-2.4.2-old/pppd/plugins/rp-pppoe/Makefile.linux ppp-2.4.2-new/pppd/plugins/rp-pppoe/Makefile.linux
--- ppp-2.4.2-old/pppd/plugins/rp-pppoe/Makefile.linux	2004-01-13 04:57:55.000000000 +0100
+++ ppp-2.4.2-new/pppd/plugins/rp-pppoe/Makefile.linux	2004-08-23 12:48:50.000000000 +0200
@@ -16,12 +16,16 @@
 # Version is set ONLY IN THE MAKEFILE!  Don't delete this!
 VERSION=3.3
 
-COPTS=-O2 -g
-CFLAGS=$(COPTS) -I../../../include/linux
+#CC = gcc
+COPTS = -O2
+COMPILE_FLAGS = -I../../../include/linux -fPIC
+
+CFLAGS = $(COPTS) $(COMPILE_FLAGS)
+
 all: rp-pppoe.so
 
 rp-pppoe.so: libplugin.a plugin.o
-	gcc -o rp-pppoe.so -shared plugin.o libplugin.a
+	$(CC) -o rp-pppoe.so -shared plugin.o libplugin.a
 
 install: all
 	$(INSTALL) -d -m 755 $(LIBDIR)
@@ -31,20 +35,20 @@
 	rm -f *.o *.so
 
 plugin.o: plugin.c
-	gcc '-DRP_VERSION="$(VERSION)"' $(CFLAGS) -I../../..  -c -o plugin.o -fPIC plugin.c
+	$(CC) -c $(CFLAGS) plugin.c '-DRP_VERSION="$(VERSION)"' -I../../..  -o plugin.o
 
 libplugin.a: discovery.o if.o common.o debug.o
-	ar -rc $@ $^
+	$(AR) -rc $@ $^
 
 discovery.o: discovery.c
-	gcc $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o discovery.o -fPIC discovery.c
+	$(CC) -c $(CFLAGS) discovery.c '-DVERSION="$(VERSION)"' -o discovery.o
 
 if.o: if.c
-	gcc $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o if.o -fPIC if.c
+	$(CC) -c $(CFLAGS) if.c '-DVERSION="$(VERSION)"' -o if.o
 
 debug.o: debug.c
-	gcc $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o debug.o -fPIC debug.c
+	$(CC) -c $(CFLAGS) debug.c '-DVERSION="$(VERSION)"' -o debug.o
 
 common.o: common.c
-	gcc $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o common.o -fPIC common.c
+	$(CC) -c $(CFLAGS) common.c '-DVERSION="$(VERSION)"' -o common.o
 
diff -ruN ppp-2.4.2-old/pppdump/Makefile.linux ppp-2.4.2-new/pppdump/Makefile.linux
--- ppp-2.4.2-old/pppdump/Makefile.linux	1999-07-26 13:09:29.000000000 +0200
+++ ppp-2.4.2-new/pppdump/Makefile.linux	2004-08-23 12:48:50.000000000 +0200
@@ -1,4 +1,8 @@
-CFLAGS= -O -I../include/net
+#CC = gcc
+COPTS = -O
+COMPILE_FLAGS = -I../include/net
+CFLAGS= $(COPTS) $(COMPILE_FLAGS)
+
 OBJS = pppdump.o bsd-comp.o deflate.o zlib.o
 
 INSTALL= install
diff -ruN ppp-2.4.2-old/pppstats/Makefile.linux ppp-2.4.2-new/pppstats/Makefile.linux
--- ppp-2.4.2-old/pppstats/Makefile.linux	2002-11-09 12:24:43.000000000 +0100
+++ ppp-2.4.2-new/pppstats/Makefile.linux	2004-08-23 12:48:50.000000000 +0200
@@ -7,11 +7,11 @@
 PPPSTATOBJS = pppstats.o
 
 #CC = gcc
-COPTS = -O
+COPTS = -O2
 COMPILE_FLAGS = -I../include
 LIBS =
 
-INSTALL= install -o root -g daemon
+INSTALL= install
 
 CFLAGS = $(COPTS) $(COMPILE_FLAGS)