]> granicus.if.org Git - procps-ng/commitdiff
pidof: remove unrequired includes
authorCraig Small <csmall@enc.com.au>
Sat, 26 Sep 2015 04:37:38 +0000 (14:37 +1000)
committerCraig Small <csmall@enc.com.au>
Sat, 26 Sep 2015 04:37:38 +0000 (14:37 +1000)
pidof was including readproc.h only because one length was used
and it didn't include some system headers.

pidof.c

diff --git a/pidof.c b/pidof.c
index a2a314cdcb2a9fdc131dfe8b74419ff0370d6ebe..b26b8df668d6e39c9370a7c2d220056d54f3300c 100644 (file)
--- a/pidof.c
+++ b/pidof.c
  */
 
 #include <stdio.h>
+#include <unistd.h>
 #include <getopt.h>
+#include <sys/types.h>
 
 #include "c.h"
 #include "fileutils.h"
 #include "nls.h"
 #include "xalloc.h"
-#include "proc/readproc.h"
+//#include "proc/readproc.h"
 #include <proc/pids.h>
 #include "proc/version.h" /* procps_version */
 
@@ -102,7 +104,7 @@ static char *get_basename (char *filename)
 
 static char *pid_link (pid_t pid, const char *base_name)
 {
-       char link [PROCPATHLEN];
+       char link [1000];
        char *result;
        int path_alloc_size;
        int len;