aboutsummaryrefslogtreecommitdiff
path: root/gdb/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/utils.c')
-rw-r--r--gdb/utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/utils.c b/gdb/utils.c
index 5d64083..af1a103 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -2533,6 +2533,8 @@ gdb_realpath (const char *filename)
char buf[PATH_MAX];
#elif defined (MAXPATHLEN)
char buf[MAXPATHLEN];
+#elif defined (HAVE_UNISTD_H) && defined(HAVE_ALLOCA)
+ char *buf = alloca ((size_t)pathconf ("/", _PC_PATH_MAX));
#else
#error "Neither PATH_MAX nor MAXPATHLEN defined"
#endif