summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/cd.c b/cd.c
index 8b0a663..7233f8d 100644
--- a/cd.c
+++ b/cd.c
@@ -17,7 +17,6 @@
*
*/
-#include "sh.h"
#include <errno.h>
#include <limits.h>
#include <stdio.h>
@@ -25,6 +24,11 @@
#include <stddef.h>
#include <string.h>
#include <unistd.h>
+#include "sh.h"
+
+#ifndef PATH_MAX
+#define PATH_MAX _POSIX_PATH_MAX
+#endif
static void cd_in_cdpath(size_t n, char p[])
{