PATH_MAX is hard to get these days on the Sun...
diff --git a/tests/tests-randomized/random-test-driver.c b/tests/tests-randomized/random-test-driver.c
index cb7bda7..32d6136 100644
--- a/tests/tests-randomized/random-test-driver.c
+++ b/tests/tests-randomized/random-test-driver.c
@@ -1,5 +1,6 @@
 #include <T.h>
 
+#include <stdio.h>
 #include <string.h>
 #include <errno.h>
 #include <unistd.h>
@@ -101,6 +102,10 @@
     return fwrite(data, 1, size, (FILE *)key) == size ? 0 : -1;
 }
 
+#ifndef PATH_MAX
+#define PATH_MAX        255
+#endif
+
 static void
 generate_random_data(enum asn_transfer_syntax syntax, const char *top_dirname, size_t max_random_value_size, int iterations, int debug) {
     char dirname[PATH_MAX];