X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Ffbsd-nat.c;h=662fa554c5a1138ecb0519de22eeb8df47a8bb86;hb=9f1b45b0da430a7a7abf9e54acbe6f2ef9d3a763;hp=5eaecdd609c88f754212526cfde3b257dcfe716a;hpb=0270a750ba588a8ad521e68be851772bac9c44f1;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/fbsd-nat.c b/gdb/fbsd-nat.c index 5eaecdd609..662fa554c5 100644 --- a/gdb/fbsd-nat.c +++ b/gdb/fbsd-nat.c @@ -1,6 +1,6 @@ /* Native-dependent code for FreeBSD. - Copyright (C) 2002-2004, 2007-2012 Free Software Foundation, Inc. + Copyright (C) 2002-2014 Free Software Foundation, Inc. This file is part of GDB. @@ -25,7 +25,7 @@ #include "gdbthread.h" #include "gdb_assert.h" -#include "gdb_string.h" +#include #include #include #include @@ -39,7 +39,7 @@ char * fbsd_pid_to_exec_file (int pid) { - size_t len = MAXPATHLEN; + size_t len = PATH_MAX; char *buf = xcalloc (len, sizeof (char)); char *path; @@ -55,7 +55,7 @@ fbsd_pid_to_exec_file (int pid) #endif path = xstrprintf ("/proc/%d/file", pid); - if (readlink (path, buf, MAXPATHLEN - 1) == -1) + if (readlink (path, buf, PATH_MAX - 1) == -1) { xfree (buf); buf = NULL;