mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-03 09:00:21 +00:00
Adapt to new struct kinfo_proc and unbreak world.
Apologies to: darrenr who is maintainer
This commit is contained in:
parent
8261e44cef
commit
5af128b21e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=70033
@ -283,12 +283,21 @@ struct tcpiphdr *ti;
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user