* John Baldwin <[EMAIL PROTECTED]> [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 - [[EMAIL PROTECTED]|[EMAIL PROTECTED]]
"I have the heart of a child; I keep it in a jar on my desk."
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message