Normalize on PATH_MAX instead of MAXPATHLEN throughout.
[deliverable/binutils-gdb.git] / gdb / darwin-nat.c
index cbf1f787b426d3f1f384c9bab39ab34f51b32631..4f851ce965eadc631ff5fca1d2f789fedfbb7948 100644 (file)
@@ -48,7 +48,6 @@
 #include <signal.h>
 #include <string.h>
 #include <ctype.h>
-#include <sys/param.h>
 #include <sys/sysctl.h>
 #include <sys/proc.h>
 #include <libproc.h>
@@ -2002,10 +2001,10 @@ darwin_pid_to_exec_file (int pid)
   char *path;
   int res;
 
-  path = xmalloc (MAXPATHLEN);
+  path = xmalloc (PATH_MAX);
   make_cleanup (xfree, path);
 
-  res = proc_pidinfo (pid, PROC_PIDPATHINFO, 0, path, MAXPATHLEN);
+  res = proc_pidinfo (pid, PROC_PIDPATHINFO, 0, path, PATH_MAX);
   if (res >= 0)
     return path;
   else
This page took 0.025335 seconds and 4 git commands to generate.