f10d51
--- psmisc-22.20/src/pstree.c	2012-09-19 14:05:43.000000000 +0100
f10d51
+++ psmisc-22.20-selinux/src/pstree.c	2012-10-08 19:18:13.992951873 +0100
f10d51
@@ -140,7 +140,12 @@
f10d51
 static int dumped = 0;                /* used by dump_by_user */
f10d51
 static int charlen = 0;                /* length of character */
f10d51
 
f10d51
+#ifdef WITH_SELINUX
f10d51
+static void fix_orphans(security_context_t scontext);
f10d51
+#else
f10d51
 static void fix_orphans(void);
f10d51
+#endif
f10d51
+
f10d51
 /*
f10d51
  * Allocates additional buffer space for width and more as needed.
f10d51
  * The first call will allocate the first buffer.
f10d51
@@ -787,7 +792,11 @@
f10d51
     }
f10d51
   }
f10d51
   (void) closedir(dir);
f10d51
+#ifdef WITH_SELINUX
f10d51
+  fix_orphans(scontext);
f10d51
+#else
f10d51
   fix_orphans();
f10d51
+#endif
f10d51
   if (print_args)
f10d51
     free(buffer);
f10d51
   if (empty) {
f10d51
@@ -796,7 +805,11 @@
f10d51
   }
f10d51
 }
f10d51
 
f10d51
+#ifdef WITH_SELINUX
f10d51
+static void fix_orphans(security_context_t scontext)
f10d51
+#else
f10d51
 static void fix_orphans(void)
f10d51
+#endif
f10d51
 {
f10d51
   /* When using kernel 3.3 with hidepid feature enabled on /proc
f10d51
    * then we need fake root pid and gather all the orphan processes