summaryrefslogtreecommitdiffstats
path: root/crypto/LPdir_unix.c
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2004-07-22 10:53:26 +0000
committerAndy Polyakov <appro@openssl.org>2004-07-22 10:53:26 +0000
commitf1bdf1d5189e272341ac1893244eda31ec1cc87d (patch)
treedf66a119d8af734da4cf4b89a2c0a73070e7d912 /crypto/LPdir_unix.c
parentd58caee734298d61b2ec119bfa31bc42a9d55480 (diff)
#include <limits.h> is required at least on HP-UX and IRIX. And what's
with HP-UX offering 14 for NAME_MAX?
Diffstat (limited to 'crypto/LPdir_unix.c')
-rw-r--r--crypto/LPdir_unix.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/crypto/LPdir_unix.c b/crypto/LPdir_unix.c
index 7298a23ae6..d207a71911 100644
--- a/crypto/LPdir_unix.c
+++ b/crypto/LPdir_unix.c
@@ -27,6 +27,7 @@
#include <stddef.h>
#include <stdlib.h>
+#include <limits.h>
#include <string.h>
#include <sys/types.h>
#include <dirent.h>
@@ -35,6 +36,12 @@
#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;