From 01761af0b370674c082d3d7cca7de63a292c7a03 Mon Sep 17 00:00:00 2001 From: hipp Date: Thu, 29 Oct 1998 17:28:44 +0000 Subject: [PATCH] Fixes to compile under non-CVS Linux 2.1.126 --- ipppd/README.RADIUS | 3 +++ ipppd/ccp.c | 8 +++----- ipppd/ipppd.h | 9 +++++++-- ipppd/options.c | 3 ++- ipppd/sys-linux.c | 8 ++++++-- 5 files changed, 21 insertions(+), 10 deletions(-) diff --git a/ipppd/README.RADIUS b/ipppd/README.RADIUS index 44524119..481e7099 100644 --- a/ipppd/README.RADIUS +++ b/ipppd/README.RADIUS @@ -1,4 +1,7 @@ Here are some notes about RADIUS extension to ipppd. +Radius related stuff should be reported to + + Matjaz Godec . 1. Current extensions are based on Lars's radiusclient-0.3-alpha-4. Don't be scared because of aplha in the name. So before enabling RADIUS features in diff --git a/ipppd/ccp.c b/ipppd/ccp.c index 77c4f15b..c174f73c 100644 --- a/ipppd/ccp.c +++ b/ipppd/ccp.c @@ -25,21 +25,19 @@ * OR MODIFICATIONS. */ -char ccp_rcsid[] = "$Id: ccp.c,v 1.8 1998/10/16 12:37:45 keil Exp $"; +char ccp_rcsid[] = "$Id: ccp.c,v 1.9 1998/10/29 17:28:45 hipp Exp $"; #include #include #include #include -#if 0 -#include -#endif -#include #include "fsm.h" #include "ipppd.h" #include "ccp.h" +#include + #include "compressions.h" #ifdef HAVE_LZSCOMP_H diff --git a/ipppd/ipppd.h b/ipppd/ipppd.h index dad2781c..6d12622f 100644 --- a/ipppd/ipppd.h +++ b/ipppd/ipppd.h @@ -16,7 +16,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: ipppd.h,v 1.16 1998/05/05 08:51:21 hipp Exp $ + * $Id: ipppd.h,v 1.17 1998/10/29 17:28:46 hipp Exp $ */ /* @@ -66,7 +66,12 @@ struct isdn_ppp_comp_data { #ifndef IPPP_COMP_FLAG_LINK #define IPPP_COMP_FLAG_LINK 0x2 #endif - +/* Old Linux Kernels don't have VERSION defined */ +#ifndef IPPP_VERSION +#define IPPP_VERSION "2.2.0" +#else +#define NEW_VERS +#endif #define NUM_PPP 64 /* 64 PPP interface supported (per process) */ diff --git a/ipppd/options.c b/ipppd/options.c index 6f3823b8..dc4d4740 100644 --- a/ipppd/options.c +++ b/ipppd/options.c @@ -17,7 +17,7 @@ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -char options_rcsid[] = "$Id: options.c,v 1.12 1998/10/16 12:37:53 keil Exp $"; +char options_rcsid[] = "$Id: options.c,v 1.13 1998/10/29 17:28:47 hipp Exp $"; #include #include @@ -2463,6 +2463,7 @@ static int resetipxproto(int slot) static int setforcedriver(int dummy) { force_driver = 1; + return 1; } diff --git a/ipppd/sys-linux.c b/ipppd/sys-linux.c index 2b6137d4..bcf87ea2 100644 --- a/ipppd/sys-linux.c +++ b/ipppd/sys-linux.c @@ -22,7 +22,7 @@ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -char sys_rcsid[] = "$Id: sys-linux.c,v 1.14 1998/07/08 16:48:24 hipp Exp $"; +char sys_rcsid[] = "$Id: sys-linux.c,v 1.15 1998/10/29 17:28:49 hipp Exp $"; #define _LINUX_STRING_H_ @@ -409,6 +409,7 @@ void ppp_recv_config (int unit,int mru,u_int32_t asyncmap,int pcomp,int accomp) */ int ccp_test (int ccp_unit, u_char *opt_ptr, int opt_len, int for_transmit) { +#ifdef NEW_VERS struct isdn_ppp_comp_data data; int linkunit = ccp_fsm[ccp_unit].unit; @@ -429,8 +430,11 @@ int ccp_test (int ccp_unit, u_char *opt_ptr, int opt_len, int for_transmit) if (ioctl(lns[linkunit].fd, PPPIOCSCOMPRESSOR, (caddr_t) &data) >= 0) return 1; - return (errno == ENOBUFS)? 0: -1; +#else + return -1; +#endif + } int ccp_get_compressors(int ccp_unit,unsigned long *protos)