Add #include <sys/param.h> to ensure PATH_MAX is defined
diff --git a/libbb/xgetcwd.c b/libbb/xgetcwd.c
index 2746681..4f77481 100644
--- a/libbb/xgetcwd.c
+++ b/libbb/xgetcwd.c
@@ -10,6 +10,7 @@
 #include <errno.h>
 #include <unistd.h>
 #include <limits.h>
+#include <sys/param.h>
 #include "libbb.h"
 
 /* Amount to increase buffer size by in each try. */