]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9041 - Cleanup limits in cyrus.c
authorHoward Chu <hyc@openldap.org>
Tue, 25 Jun 2019 14:31:31 +0000 (15:31 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Tue, 25 Jun 2019 14:58:56 +0000 (14:58 +0000)
libraries/libldap/cyrus.c

index f292527de061fed149076046d338498970bbfdfb..fdc2772271e44979cc9b4f7a84b05446509ebb3a 100644 (file)
@@ -15,6 +15,8 @@
 
 #include "portable.h"
 
+#ifdef HAVE_CYRUS_SASL
+
 #include <stdio.h>
 
 #include <ac/socket.h>
 
 #include "ldap-int.h"
 
-#ifdef HAVE_CYRUS_SASL
-
-#ifdef HAVE_LIMITS_H
-#include <limits.h>
-#endif
-
 #ifndef INT_MAX
 #define        INT_MAX 2147483647      /* 32 bit signed max */
 #endif
 
+#if !defined(HOST_NAME_MAX) && defined(_POSIX_HOST_NAME_MAX)
+#define HOST_NAME_MAX _POSIX_HOST_NAME_MAX
+#endif
+
 #ifdef HAVE_SASL_SASL_H
 #include <sasl/sasl.h>
 #else