Index: cddl/contrib/opensolaris/cmd/dtrace/dtrace.c =================================================================== --- cddl/contrib/opensolaris/cmd/dtrace/dtrace.c (revision 202242) +++ cddl/contrib/opensolaris/cmd/dtrace/dtrace.c (working copy) @@ -773,10 +773,15 @@ static void prochandler(struct ps_prochandle *P, const char *msg, void *arg) { -fatal("DOODAD in function %s, file %s, line %d\n",__FUNCTION__,__FILE__,__LINE__); -#ifdef DOODAD +#if defined(sun) const psinfo_t *prp = Ppsinfo(P); int pid = Pstatus(P)->pr_pid; +#else +#define SIG2STR_MAX 32 + typedef struct psinfo { int pr_wstat; } psinfo_t; + const psinfo_t *prp = NULL; + int pid = proc_getpid(P); +#endif char name[SIG2STR_MAX]; if (msg != NULL) { @@ -784,7 +789,11 @@ return; } +#if defined(sun) switch (Pstate(P)) { +#else + switch (proc_state(P)) { +#endif case PS_UNDEAD: /* * Ideally we would like to always report pr_wstat here, but it @@ -812,7 +821,6 @@ g_pslive--; break; } -#endif } /*ARGSUSED*/