From owner-freebsd-isdn Sun Apr 5 07:56:44 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA27865 for freebsd-isdn-outgoing; Sun, 5 Apr 1998 07:56:44 -0700 (PDT) (envelope-from owner-freebsd-isdn@FreeBSD.ORG) Received: from rvc1.informatik.ba-stuttgart.de (rvc1.informatik.ba-stuttgart.de [141.31.112.22]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA27860 for ; Sun, 5 Apr 1998 07:56:35 -0700 (PDT) (envelope-from helbig@Informatik.BA-Stuttgart.DE) Received: (from helbig@localhost) by rvc1.informatik.ba-stuttgart.de (8.8.8/8.8.5) id QAA00283; Sun, 5 Apr 1998 16:56:17 +0200 (MET DST) From: Wolfgang Helbig Message-Id: <199804051456.QAA00283@rvc1.informatik.ba-stuttgart.de> Subject: Re: -current: Undefined symbol `_time' referenced from text segment In-Reply-To: <199804051248.OAA02553@peedub.muc.de> from Gary Jennejohn at "Apr 5, 98 02:48:36 pm" To: garyj@muc.de Date: Sun, 5 Apr 1998 16:56:17 +0200 (MET DST) Cc: hm@hcs.de (Hellmuth Michaelis), freebsd-isdn@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL30 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-isdn@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > Wolfgang Helbig writes: > >> unfortuantely, you eliminated some changes which NetBSD requires. Otherwise, > > > >Oops, sorry about that. I really tried not to ... > >Where did I screw it up? > > > > some deletions were merely in comments, so not harmful (that's how I noticed > that you'd deleted NetBSD stuff). Don't know how that happened. Here is another try. This is a diff for if_spppsubr.c only, this time w/o deleting comments and breaking NetBSD support (hopefully). Hellmuth, please don't apply the if_spppsubr.c patch from the big diff I sent yesterday, it's at the end of the file. Instead try this one: Wolfgang --- /home/helbig/src/i4b/sppp/if_spppsubr.c Thu Mar 19 20:36:57 1998 +++ sppp/if_spppsubr.c Sun Apr 5 16:40:58 1998 @@ -17,7 +17,7 @@ * * From: Version 2.4, Thu Apr 30 17:17:21 MSD 1997 * - * From: if_spppsubr.c,v 1.32 1998/02/09 06:09:57 eivind Exp + * From: if_spppsubr.c,v 1.36 1998/04/04 13:26:03 phk Exp * * $Id: if_spppsubr.c,v 1.10 1998/03/19 19:36:57 hm Exp $ */ @@ -33,6 +33,9 @@ #include #include #include +#if defined(__FreeBSD__) && __FreeBSD__ >= 3 +#include +#endif #include #include #include @@ -1031,7 +1034,11 @@ ++sp->pp_loopcnt; /* Generate new local sequence number */ +#if defined(__FreeBSD__) && __FreeBSD__ >= 3 + read_random((char*)&sp->pp_seq, sizeof sp->pp_seq); +#else sp->pp_seq ^= time.tv_sec ^ time.tv_usec; +#endif break; } sp->pp_loopcnt = 0; @@ -1059,8 +1066,16 @@ struct ppp_header *h; struct cisco_packet *ch; struct mbuf *m; +#if defined(__FreeBSD__) && __FreeBSD__ >= 3 + struct timeval tv; +#else u_long t = (time.tv_sec - boottime.tv_sec) * 1000; +#endif +#if defined(__FreeBSD__) && __FreeBSD__ >= 3 + getmicroruntime(&tv); +#endif + MGETHDR (m, M_DONTWAIT, MT_DATA); if (! m) return; @@ -1077,8 +1092,14 @@ ch->par1 = htonl (par1); ch->par2 = htonl (par2); ch->rel = -1; + +#if defined(__FreeBSD__) && __FreeBSD__ >= 3 + ch->time0 = htons ((u_short) (tv.tv_sec >> 16)); + ch->time1 = htons ((u_short) tv.tv_sec); +#else ch->time0 = htons ((u_short) (t >> 16)); ch->time1 = htons ((u_short) t); +#endif if (debug) log(LOG_DEBUG, @@ -2168,7 +2189,11 @@ if (magic == ~sp->lcp.magic) { if (debug) addlog("magic glitch "); - sp->lcp.magic += time.tv_sec + time.tv_usec; +#if defined(__FreeBSD__) && __FreeBSD__ >= 3 + read_random((char*)&sp->lcp.magic, sizeof sp->lcp.magic); +#else + sp->lcp.magic = time.tv_sec + time.tv_usec; +#endif } else { sp->lcp.magic = magic; if (debug) @@ -2328,7 +2353,11 @@ if (sp->lcp.opts & (1 << LCP_OPT_MAGIC)) { if (! sp->lcp.magic) +#if defined(__FreeBSD__) && __FreeBSD__ >= 3 + read_random((char*)&sp->lcp.magic, sizeof sp->lcp.magic); +#else sp->lcp.magic = time.tv_sec + time.tv_usec; +#endif opt[i++] = LCP_OPT_MAGIC; opt[i++] = 6; opt[i++] = sp->lcp.magic >> 24; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isdn" in the body of the message