From d595ac63f49faf9f7297ed2e98b93bce7ee034bb Mon Sep 17 00:00:00 2001 From: "Maciej W. Rozycki" Date: Fri, 26 Oct 2001 12:00:00 -0400 Subject: [PATCH] Application of mopd-2.5.3-proto.patch: * Fri Oct 26 2001 Maciej W. Rozycki - updated the proto, select, aout and syslog patches due to file location rearrangements (proto, select, aout, syslog) * Sat Feb 5 2000 Maciej W. Rozycki - replaced the string patch with a more general prototype fix (proto) Downloaded from: ftp://ftp.linux-mips.org/pub/linux/mips/people/macro/mopd/mopd-2.5.3-proto.patch.gz .patch SHA256 = 45e6a6ef14830ae32ca69b2ce5429ca86454f65e6526e86bd0db5cebf728bcd0 Patch history copied from: ftp://ftp.linux-mips.org/pub/linux/mips/people/macro/mopd/mopd-2.5.3-15.spec --- common/device.c | 3 ++- common/dl.c | 2 +- common/get.c | 3 ++- common/get.h | 4 ++-- common/pf.h | 4 ++-- common/rc.c | 2 +- mopchk/mopchk.c | 2 +- mopd/process.c | 6 ++++++ 8 files changed, 17 insertions(+), 9 deletions(-) diff --git a/common/device.c b/common/device.c index 3449016..9131092 100644 --- a/common/device.c +++ b/common/device.c @@ -34,6 +34,7 @@ static char rcsid[] = "$Id: device.c,v 1.21 1996/08/08 00:00:59 moj Exp $"; #include "os.h" #include "common.h" #include "mopdef.h" +#include "pf.h" struct if_info *iflist; /* Interface List */ @@ -319,7 +320,7 @@ deviceInitAll() ifc.ifc_len = sizeof ibuf; ifc.ifc_buf = (caddr_t)ibuf; if (ioctl(fd, SIOCGIFCONF, (char *)&ifc) < 0 || - ifc.ifc_len < sizeof(struct ifreq)) { + ifc.ifc_len < (int)sizeof(struct ifreq)) { syslog(LOG_ERR, "deviceInitAll: old SIOCGIFCONF: %m"); exit(1); } diff --git a/common/dl.c b/common/dl.c index add3afd..2338ed3 100644 --- a/common/dl.c +++ b/common/dl.c @@ -43,7 +43,7 @@ mopDumpDL(fd, pkt, trans) int trans; { int i,index = 0; - long tmpl; + u_int tmpl; u_char tmpc,c,program[257],code,*ucp; int len,tmps,moplen; diff --git a/common/get.c b/common/get.c index f1ce0e1..83ee485 100644 --- a/common/get.c +++ b/common/get.c @@ -32,6 +32,7 @@ static char rcsid[] = "$Id: get.c,v 1.5 1996/03/31 18:50:14 moj Exp $"; #endif #include +#include #include "mopdef.h" u_char @@ -58,7 +59,7 @@ mopGetShort(pkt, index) return(ret); } -u_long +u_int mopGetLong(pkt, index) register u_char *pkt; register int *index; diff --git a/common/get.h b/common/get.h index b9b54c1..a8a1444 100644 --- a/common/get.h +++ b/common/get.h @@ -36,7 +36,7 @@ #ifdef NO__P u_char mopGetChar (/* u_char *, int * */); u_short mopGetShort (/* u_char *, int * */); -u_long mopGetLong (/* u_char *, int * */); +u_int mopGetLong (/* u_char *, int * */); void mopGetMulti (/* u_char *, int *,u_char *,int */); int mopGetTrans (/* u_char *, int */); void mopGetHeader (/* u_char *, int *, u_char **, u_char **, u_short *, @@ -46,7 +46,7 @@ u_short mopGetLength (/* u_char *, int */); __BEGIN_DECLS u_char mopGetChar __P((u_char *,int *)); u_short mopGetShort __P((u_char *,int *)); -u_long mopGetLong __P((u_char *,int *)); +u_int mopGetLong __P((u_char *,int *)); void mopGetMulti __P((u_char *,int *,u_char *,int)); int mopGetTrans __P((u_char *, int)); void mopGetHeader __P((u_char *, int *, u_char **, u_char **, u_short *, diff --git a/common/pf.h b/common/pf.h index ba70b68..713fe44 100644 --- a/common/pf.h +++ b/common/pf.h @@ -36,7 +36,7 @@ #ifdef NO__P int pfTrans (/* char * */); int pfInit (/* char *, int, u_short, int */); -int pfEthAddr (/* int, u_char * */); +int pfEthAddr (/* int, char *, u_char * */); int pfAddMulti (/* int, char *, char * */); int pfDelMulti (/* int, char *, char * */); int pfRead (/* int, u_char *, int */); @@ -45,7 +45,7 @@ int pfWrite (/* int, u_char *, int, int */); __BEGIN_DECLS int pfTrans __P((char *)); int pfInit __P((char *, int, u_short, int)); -int pfEthAddr __P((int, u_char *)); +int pfEthAddr __P((int, char *, u_char *)); int pfAddMulti __P((int, char *, char *)); int pfDelMulti __P((int, char *, char *)); int pfRead __P((int, u_char *, int)); diff --git a/common/rc.c b/common/rc.c index 6d20f68..fd05df2 100644 --- a/common/rc.c +++ b/common/rc.c @@ -43,7 +43,7 @@ mopDumpRC(fd, pkt, trans) int trans; { int i,index = 0; - long tmpl; + u_int tmpl; u_char tmpc,code,control; int len,tmps,moplen; diff --git a/mopchk/mopchk.c b/mopchk/mopchk.c index 544fa23..7455c1e 100644 --- a/mopchk/mopchk.c +++ b/mopchk/mopchk.c @@ -164,7 +164,7 @@ main(argc, argv) void Usage() { - (void) fprintf(stderr, "usage: %d [-a] [-v] [filename...]\n",Program); + fprintf(stderr, "usage: %s [-a] [-v] [filename...]\n", Program); exit(1); } diff --git a/mopd/process.c b/mopd/process.c index 15f08bd..6dfed64 100644 --- a/mopd/process.c +++ b/mopd/process.c @@ -56,6 +56,12 @@ struct dllist dllist[MAXDL]; /* dump/load list */ extern char dl_mcst[]; /* Dump/Load Multicast */ extern char rc_mcst[]; /* Remote Console Multicast */ +#ifdef NO__P +ssize_t mopFileRead (/* struct dllist *, u_char * */); +#else +ssize_t mopFileRead __P((struct dllist *, u_char *)); +#endif + void mopProcessInfo(pkt,index,moplen,dl_rpr,trans) u_char *pkt;