#include <limits.h> is required at least on HP-UX and IRIX. And what's
authorAndy Polyakov <appro@openssl.org>
Thu, 22 Jul 2004 10:53:26 +0000 (10:53 +0000)
committerAndy Polyakov <appro@openssl.org>
Thu, 22 Jul 2004 10:53:26 +0000 (10:53 +0000)
with HP-UX offering 14 for NAME_MAX?

crypto/LPdir_unix.c

index 7298a23ae6e4c9e3f8086ce1bb0dbb8828dd1b74..d207a71911fb6b2e0944aafdb3ead35df81685f0 100644 (file)
@@ -27,6 +27,7 @@
 
 #include <stddef.h>
 #include <stdlib.h>
+#include <limits.h>
 #include <string.h>
 #include <sys/types.h>
 #include <dirent.h>
 #include "LPdir.h"
 #endif
 
+#if defined(NAME_MAX) && NAME_MAX<255
+/* HP-UX offers 14 for NAME_MAX, which is far from enough */
+# undef NAME_MAX
+# define NAME_MAX 255
+#endif
+
 struct LP_dir_context_st
 {
   DIR *dir;