--- src/pstree.c +++ src/pstree.c 2012-12-18 17:06:03.369452415 +0000 @@ -141,7 +141,11 @@ static char last_char = 0; static int dumped = 0; /* used by dump_by_user */ static int charlen = 0; /* length of character */ +#ifdef WITH_SELINUX +static void fix_orphans(security_context_t scontext); +#else static void fix_orphans(void); +#endif /* * Allocates additional buffer space for width and more as needed. * The first call will allocate the first buffer. @@ -810,7 +814,11 @@ static void read_proc(void) } } (void) closedir(dir); +#ifdef WITH_SELINUX + fix_orphans(scontext); +#else fix_orphans(); +#endif if (print_args) free(buffer); if (empty) { @@ -819,7 +827,11 @@ static void read_proc(void) } } +#ifdef WITH_SELINUX +static void fix_orphans(security_context_t scontext) +#else static void fix_orphans(void) +#endif { /* When using kernel 3.3 with hidepid feature enabled on /proc * then we need fake root pid and gather all the orphan processes