Make this build.

This commit is contained in:
tnn 2008-07-29 21:02:23 +00:00
parent bbb376ec3a
commit 6d3dc5e367
4 changed files with 35 additions and 27 deletions

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.5 2007/06/11 12:36:23 tron Exp $
$NetBSD: distinfo,v 1.6 2008/07/29 21:02:23 tnn Exp $
SHA1 (ppp-2.4.3.tar.gz) = 5e2789f4dedc81943fa9f94c840cccc2407056f7
RMD160 (ppp-2.4.3.tar.gz) = 845821496bacb07d93bb7572a171854853ef722b
@ -26,16 +26,16 @@ SHA1 (patch-at) = ab5d74511ff1b83953f3595b6d71b0c130bdc966
SHA1 (patch-au) = b74e19ee4f9e09bfbb0f8be15b1baa80a7e11ce4
SHA1 (patch-av) = 6ae49e8f2d5d74fa437e100b27a021451feb8f28
SHA1 (patch-aw) = 7fb53f72216ffe34720b76fc122e87f4762a6696
SHA1 (patch-ax) = 3641654b6b158ad65e9dd95247836fa8c07ec66e
SHA1 (patch-ax) = 0b9583346009b94f29084bd69963ad2d2e80ed5d
SHA1 (patch-ay) = 93ccd90f6efa58bfe31105526499308ed35b9522
SHA1 (patch-az) = 76f29697ad08bfb6aee2bfafca4a49aa706c08fb
SHA1 (patch-ba) = 4293edb8b490fe31e07268a6d7001e1c9db8f323
SHA1 (patch-bb) = 9b17b12b45d9857eea42c2a6dc3704392c4df7c0
SHA1 (patch-bc) = d53a2226166e84fa9ea049cdbfb52c1dcd0f1ed9
SHA1 (patch-bd) = 142545e81f05f5efbc35629bf6cf1e791f3dc4f9
SHA1 (patch-be) = 2685b1c382506c746e18b9047fdd1816d1af96b8
SHA1 (patch-be) = e216f70f5fd2d6f5ad44a3c3ebc6146557a2deb9
SHA1 (patch-bf) = 16788a1508cd981ff8967915a86a1fb02e55330c
SHA1 (patch-bg) = 29c0880b6a30ab16b62a538c42cdbb6296add506
SHA1 (patch-bg) = 66b7d5a1ac2816f36a656c7c16a4862f313633f0
SHA1 (patch-bh) = 8136e968fadbc2cc08006651772b943313cb6641
SHA1 (patch-bi) = 56d8389724807a8317b16219fbfb81b6da623d10
SHA1 (patch-bj) = ad5618b6243414ce2649b200096a53194f48c735

View file

@ -1,8 +1,18 @@
$NetBSD: patch-ax,v 1.1.1.1 2005/01/02 02:51:42 cube Exp $
$NetBSD: patch-ax,v 1.2 2008/07/29 21:02:23 tnn Exp $
--- pppd/pppd.h.orig 2004-11-13 13:02:22.000000000 +0100
+++ pppd/pppd.h
@@ -213,7 +213,7 @@ struct notifier {
@@ -85,7 +85,8 @@
* Option descriptor structure.
*/
-typedef unsigned char bool;
+/* typedef unsigned char bool; */
+#include <stdbool.h>
enum opt_type {
o_special_noarg = 0,
@@ -213,7 +214,7 @@ struct notifier {
extern int hungup; /* Physical layer has disconnected */
extern int ifunit; /* Interface unit number */
extern char ifname[]; /* Interface name */
@ -11,7 +21,7 @@ $NetBSD: patch-ax,v 1.1.1.1 2005/01/02 02:51:42 cube Exp $
extern u_char outpacket_buf[]; /* Buffer for outgoing packets */
extern int devfd; /* fd of underlying device */
extern int fd_ppp; /* fd for talking PPP */
@@ -336,8 +336,13 @@ extern int maxoctets_timeout; /*
@@ -336,8 +337,13 @@ extern int maxoctets_timeout; /*
#endif
#ifdef PPP_FILTER
@ -27,7 +37,7 @@ $NetBSD: patch-ax,v 1.1.1.1 2005/01/02 02:51:42 cube Exp $
#endif
#ifdef MSLANMAN
@@ -506,8 +511,10 @@ void print_string __P((char *, int, voi
@@ -506,8 +512,10 @@ void print_string __P((char *, int, voi
void *)); /* Format a string for output */
int slprintf __P((char *, int, char *, ...)); /* sprintf++ */
int vslprintf __P((char *, int, char *, va_list)); /* vsprintf++ */
@ -38,7 +48,7 @@ $NetBSD: patch-ax,v 1.1.1.1 2005/01/02 02:51:42 cube Exp $
void dbglog __P((char *, ...)); /* log a debug message */
void info __P((char *, ...)); /* log an informational message */
void notice __P((char *, ...)); /* log a notice-level message */
@@ -657,7 +664,8 @@ void logwtmp __P((const char *, const ch
@@ -657,7 +665,8 @@ void logwtmp __P((const char *, const ch
int get_host_seed __P((void)); /* Get host-dependent random number seed */
int have_route_to __P((u_int32_t)); /* Check if route to addr exists */
#ifdef PPP_FILTER
@ -48,7 +58,7 @@ $NetBSD: patch-ax,v 1.1.1.1 2005/01/02 02:51:42 cube Exp $
/* Set filter programs in kernel */
#endif
#ifdef IPX_CHANGE
@@ -709,6 +717,10 @@ extern int (*allowed_address_hook) __P((
@@ -709,6 +718,10 @@ extern int (*allowed_address_hook) __P((
extern void (*ip_up_hook) __P((void));
extern void (*ip_down_hook) __P((void));
extern void (*ip_choose_hook) __P((u_int32_t *));

View file

@ -1,6 +1,6 @@
$NetBSD: patch-be,v 1.1.1.1 2005/01/02 02:51:44 cube Exp $
$NetBSD: patch-be,v 1.2 2008/07/29 21:02:23 tnn Exp $
--- pppdump/Makefile.netbsd.orig 2004-12-31 23:51:00.000000000 +0100
--- pppdump/Makefile.netbsd.orig 2008-07-29 22:51:39.000000000 +0200
+++ pppdump/Makefile.netbsd
@@ -0,0 +1,21 @@
+DESTDIR = @DESTDIR@
@ -8,14 +8,14 @@ $NetBSD: patch-be,v 1.1.1.1 2005/01/02 02:51:44 cube Exp $
+MANDIR = $(DESTDIR)/man/man8
+
+CFLAGS= -O -I../include/net
+OBJS = pppdump.o bsd-comp.o deflate.o
+OBJS = pppdump.o bsd-comp.o deflate.o zlib.o
+
+INSTALL= install
+
+all: pppdump
+
+pppdump: $(OBJS)
+ $(CC) -o pppdump $(OBJS) -lz
+ $(CC) -o pppdump $(OBJS)
+
+clean:
+ rm -f pppdump $(OBJS) *~

View file

@ -1,8 +1,8 @@
$NetBSD: patch-bg,v 1.1.1.1 2005/01/02 02:51:44 cube Exp $
$NetBSD: patch-bg,v 1.2 2008/07/29 21:02:23 tnn Exp $
--- pppdump/deflate.c.orig 2004-02-02 04:36:46.000000000 +0100
+++ pppdump/deflate.c
@@ -41,9 +41,16 @@
@@ -41,8 +41,14 @@
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
@ -10,16 +10,14 @@ $NetBSD: patch-bg,v 1.1.1.1 2005/01/02 02:51:44 cube Exp $
+#ifdef __NetBSD__
+#include <net/ppp_defs.h>
+#include <net/ppp-comp.h>
+#include <zlib.h>
+#else
#include "ppp_defs.h"
#include "ppp-comp.h"
#include "zlib.h"
+#endif
#include "zlib.h"
#if DO_DEFLATE
@@ -71,9 +78,8 @@ static void *z_decomp_alloc __P((u_char
@@ -71,9 +77,8 @@ static void *z_decomp_alloc __P((u_char
static void z_decomp_free __P((void *state));
static int z_decomp_init __P((void *state, u_char *options, int opt_len,
int unit, int hdrlen, int mru, int debug));
@ -31,7 +29,7 @@ $NetBSD: patch-bg,v 1.1.1.1 2005/01/02 02:51:44 cube Exp $
static void z_decomp_reset __P((void *state));
static void z_comp_stats __P((void *state, struct compstat *stats));
@@ -82,6 +88,12 @@ static void z_comp_stats __P((void *stat
@@ -82,6 +87,12 @@ static void z_comp_stats __P((void *stat
*/
struct compressor ppp_deflate = {
CI_DEFLATE, /* compress_proto */
@ -44,7 +42,7 @@ $NetBSD: patch-bg,v 1.1.1.1 2005/01/02 02:51:44 cube Exp $
z_decomp_alloc, /* decomp_alloc */
z_decomp_free, /* decomp_free */
z_decomp_init, /* decomp_init */
@@ -230,17 +242,17 @@ z_decomp_reset(arg)
@@ -230,17 +241,17 @@ z_decomp_reset(arg)
* compression, even though they are detected by inspecting the input.
*/
static int
@ -68,7 +66,7 @@ $NetBSD: patch-bg,v 1.1.1.1 2005/01/02 02:51:44 cube Exp $
if (*rptr == 0)
++rptr;
++rptr;
@@ -261,9 +273,9 @@ z_decompress(arg, mi, inlen, mo, outlenp
@@ -261,9 +272,9 @@ z_decompress(arg, mi, inlen, mo, outlenp
/*
* Set up to call inflate.
*/
@ -80,7 +78,7 @@ $NetBSD: patch-bg,v 1.1.1.1 2005/01/02 02:51:44 cube Exp $
rlen = state->strm.avail_in + PPP_HDRLEN + DEFLATE_OVHD;
state->strm.next_out = wptr;
state->strm.avail_out = state->mru + 2;
@@ -278,7 +290,7 @@ z_decompress(arg, mi, inlen, mo, outlenp
@@ -278,7 +289,7 @@ z_decompress(arg, mi, inlen, mo, outlenp
return DECOMP_FATALERROR;
}
olen = state->mru + 2 - state->strm.avail_out;
@ -89,7 +87,7 @@ $NetBSD: patch-bg,v 1.1.1.1 2005/01/02 02:51:44 cube Exp $
if ((wptr[0] & 1) != 0)
++olen; /* for suppressed protocol high byte */
@@ -302,10 +314,9 @@ z_decompress(arg, mi, inlen, mo, outlenp
@@ -302,10 +313,9 @@ z_decompress(arg, mi, inlen, mo, outlenp
* Incompressible data has arrived - add it to the history.
*/
static void
@ -102,7 +100,7 @@ $NetBSD: patch-bg,v 1.1.1.1 2005/01/02 02:51:44 cube Exp $
{
struct deflate_state *state = (struct deflate_state *) arg;
u_char *rptr;
@@ -314,7 +325,7 @@ z_incomp(arg, mi, mlen)
@@ -314,7 +324,7 @@ z_incomp(arg, mi, mlen)
/*
* Check that the protocol is one we handle.
*/
@ -111,7 +109,7 @@ $NetBSD: patch-bg,v 1.1.1.1 2005/01/02 02:51:44 cube Exp $
proto = rptr[0];
if ((proto & 1) == 0)
proto = (proto << 8) + rptr[1];
@@ -325,7 +336,7 @@ z_incomp(arg, mi, mlen)
@@ -325,7 +335,7 @@ z_incomp(arg, mi, mlen)
if (rptr[0] == 0)
++rptr;