Date: Thu, 14 Dec 2000 10:26:40 -0800 From: Alfred Perlstein <bright@wintelcom.net> To: John Baldwin <jhb@FreeBSD.ORG> Cc: John Hay <jhay@icomtek.csir.co.za>, current@FreeBSD.ORG Subject: Re: ipsend and iptest compile error Message-ID: <20001214102640.D4589@fw.wintelcom.net> In-Reply-To: <XFMail.001214101314.jhb@FreeBSD.org>; from jhb@FreeBSD.ORG on Thu, Dec 14, 2000 at 10:13:14AM -0800 References: <200012141051.eBEApt877092@zibbi.icomtek.csir.co.za> <XFMail.001214101314.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
* John Baldwin <jhb@FreeBSD.ORG> [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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001214102640.D4589>