From 8f6cd00c0344cc2c4a1087aecf04ededc67b6783 Mon Sep 17 00:00:00 2001
From: Quanah Gibson-Mount <quanah@openldap.org>
Date: Fri, 30 Oct 2009 19:37:08 +0000
Subject: [PATCH] ITS#6342

---
 CHANGES                 | 3 +++
 servers/slapd/bconfig.c | 1 +
 servers/slapd/config.c  | 5 +----
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/CHANGES b/CHANGES
index d4da101c95..d355e2f381 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,7 @@ OpenLDAP 2.4 Change Log
 
 OpenLDAP 2.4.20 Engineering
 	Fixed libldap uninitialized return value (ITS#6355)
+	Fixed slapd inclusion of ac/unistd.h (ITS#6342)
 	Fixed slapd debug handling of LDAP_DEBUG_ANY (ITS#6324)
 	Fixed slapd termination for one level dns (ITS#6338)
 	Fixed slapd-bdb cache corruption (ITS#6341)
@@ -9,6 +10,8 @@ OpenLDAP 2.4.20 Engineering
 	Fixed slapd-relay bind segfault (ITS#6337)
 	Fixed slapo-memberof operational attr updates (ITS#6329)
 	Fixed slapo-syncprov deadlock (ITS#6335)
+	Build Environment
+		Fixed slapd MAXPATHLEN handling (ITS#6342)
 	Documentation
 		ldap_get_dn(3) typos (ITS#5366)
 
diff --git a/servers/slapd/bconfig.c b/servers/slapd/bconfig.c
index e02d90e89b..e1feb56249 100644
--- a/servers/slapd/bconfig.c
+++ b/servers/slapd/bconfig.c
@@ -25,6 +25,7 @@
 #include <ac/ctype.h>
 #include <ac/errno.h>
 #include <sys/stat.h>
+#include <ac/unistd.h>
 
 #include "slap.h"
 
diff --git a/servers/slapd/config.c b/servers/slapd/config.c
index b90ae1ec75..22e1e982aa 100644
--- a/servers/slapd/config.c
+++ b/servers/slapd/config.c
@@ -33,6 +33,7 @@
 #include <ac/signal.h>
 #include <ac/socket.h>
 #include <ac/errno.h>
+#include <ac/unistd.h>
 
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -41,10 +42,6 @@
 #define	S_ISREG(m)	(((m) & _S_IFMT) == _S_IFREG)
 #endif
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
 #include "slap.h"
 #ifdef LDAP_SLAPI
 #include "slapi/slapi.h"
-- 
GitLab