From owner-freebsd-current Thu Dec 14 10:26:44 2000 From owner-freebsd-current@FreeBSD.ORG Thu Dec 14 10:26:42 2000 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 5A4B737B402; Thu, 14 Dec 2000 10:26:42 -0800 (PST) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id eBEIQe508301; Thu, 14 Dec 2000 10:26:40 -0800 (PST) Date: Thu, 14 Dec 2000 10:26:40 -0800 From: Alfred Perlstein To: John Baldwin Cc: John Hay , current@FreeBSD.ORG Subject: Re: ipsend and iptest compile error Message-ID: <20001214102640.D4589@fw.wintelcom.net> References: <200012141051.eBEApt877092@zibbi.icomtek.csir.co.za> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from jhb@FreeBSD.ORG on Thu, Dec 14, 2000 at 10:13:14AM -0800 Sender: bright@fw.wintelcom.net Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * John Baldwin [001214 10:14] wrote: > > On 14-Dec-00 John Hay wrote: > > The struct kinfo_proc changes breaks compiling ipsend and iptest. This > > patch fix the compile problem, but I don't know if it is the correct > > fix. Anybody care to comment? With this at least "make world" finished > > without a problem. > > It's the right patch, I posted it here 2 days ago. :) However, this is 3rd > party code that lives on a vendor branch. Does anyone object if I temporarily > add sock.c to src/usr.sbin/ipsend/ so I can fix it w/o pulling it off the > vendor branch, or should I just fix it on the vendor branch, or pull it off the > vendor branch? I had no problems compiling iptest, just ipsend, this patch: Index: sock.c =================================================================== RCS file: /home/ncvs/src/contrib/ipfilter/ipsend/sock.c,v retrieving revision 1.3 diff -u -r1.3 sock.c --- sock.c 2000/02/10 03:17:46 1.3 +++ sock.c 2000/12/14 02:15:55 @@ -283,12 +283,21 @@ return NULL; fd = (struct filedesc *)malloc(sizeof(*fd)); +#if defined( __FreeBSD_version) && __FreeBSD_version >= 500013 + if (KMCPY(fd, p->ki_fd, sizeof(*fd)) == -1) + { + fprintf(stderr, "read(%#lx,%#lx) failed\n", + (u_long)p, (u_long)p->ki_fd); + return NULL; + } +#else if (KMCPY(fd, p->kp_proc.p_fd, sizeof(*fd)) == -1) { fprintf(stderr, "read(%#lx,%#lx) failed\n", (u_long)p, (u_long)p->kp_proc.p_fd); return NULL; } +#endif o = (struct file **)calloc(1, sizeof(*o) * (fd->fd_lastfile + 1)); if (KMCPY(o, fd->fd_ofiles, (fd->fd_lastfile + 1) * sizeof(*o)) == -1) ...which I sent to Darren yesterday evening could be applied. I haven't heard back however. -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] "I have the heart of a child; I keep it in a jar on my desk." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message