$NetBSD: patch-ai,v 1.1 2006/02/28 23:48:12 joerg Exp $ --- sysdeps/freebsd/prockernel.c.orig 2004-09-24 22:49:06.000000000 +0000 +++ sysdeps/freebsd/prockernel.c @@ -35,7 +35,7 @@ #include #endif #if !defined(__bsdi__) && !(defined(__FreeBSD__) && defined(__alpha__)) && \ - !defined(__NetBSD__) + !defined(__NetBSD__) && !defined(__DragonFly__) #include #endif @@ -93,7 +93,7 @@ glibtop_get_proc_kernel_p (glibtop *serv pid_t pid) { struct kinfo_proc *pinfo; -#ifndef __FreeBSD__ +#if !defined(__FreeBSD__) && !defined(__DragonFly__) struct user *u_addr = (struct user *)USRSTACK; struct pstats pstats; struct pcb pcb; @@ -126,9 +126,14 @@ glibtop_get_proc_kernel_p (glibtop *serv #else +#ifdef __DragonFly__ +#define PROC_WCHAN kp_thread.td_wchan +#define PROC_WMESG kp_thread.td_wmesg +#else #define PROC_WCHAN kp_proc.p_wchan #define PROC_WMESG kp_proc.p_wmesg #define PROC_WMESG kp_eproc.e_wmesg +#endif #endif @@ -146,7 +151,7 @@ glibtop_get_proc_kernel_p (glibtop *serv } #endif -#ifndef __FreeBSD__ +#if !defined(__FreeBSD__) && !defined(__DragonFly__) /* Taken from `saveuser ()' in `/usr/src/bin/ps/ps.c'. */