--- a/src/H5F.c
+++ b/src/H5F.c
@@ -80,6 +80,10 @@
 /* Declare a free list to manage the H5F_file_t struct */
 H5FL_DEFINE(H5F_file_t);
 
+#ifndef PATH_MAX
+#define PATH_MAX    4096
+#endif  /* !PATH_MAX */
+
 
 /*-------------------------------------------------------------------------
  * Function:	H5F_init
--- a/testpar/t_cache.c
+++ b/testpar/t_cache.c
@@ -35,6 +35,10 @@
 
 #include "H5Fpkg.h"
 
+#ifndef PATH_MAX
+#define PATH_MAX    512
+#endif  /* !PATH_MAX */
+
 
 int     	nerrors = 0;
 int		failures = 0;
