From 1d903ac3a1e6d7e840779cdca5dbd5154ab0b504 Mon Sep 17 00:00:00 2001
From: Quanah Gibson-Mount <quanah@openldap.org>
Date: Thu, 24 Mar 2011 18:22:43 +0000
Subject: [PATCH] ITS#6870

---
 CHANGES                                 | 1 +
 libraries/libldap/Makefile.in           | 4 ++--
 libraries/{liblutil => libldap}/fetch.c | 0
 libraries/{liblutil => libldap}/ldif.c  | 0
 libraries/libldap_r/Makefile.in         | 4 ++--
 libraries/liblutil/Makefile.in          | 4 ++--
 servers/slapd/daemon.c                  | 4 ++--
 7 files changed, 9 insertions(+), 8 deletions(-)
 rename libraries/{liblutil => libldap}/fetch.c (100%)
 rename libraries/{liblutil => libldap}/ldif.c (100%)

diff --git a/CHANGES b/CHANGES
index 019d7570e8..48c9c85e03 100644
--- a/CHANGES
+++ b/CHANGES
@@ -19,6 +19,7 @@ OpenLDAP 2.4.25 Engineering
 		Fixed windows NT threads build (ITS#6859)
 		Fixed libldap/lberl/util if/else usage (ITS#6832)
 		Fixed Windows odbc32 detection (ITS#6125)
+		Fixed Windows msys build (ITS#6870)
 		Fixed test020 exit codes (ITS#6404)
 	Documentation
 		admin24 guide ldapi usage (ITS#6839)
diff --git a/libraries/libldap/Makefile.in b/libraries/libldap/Makefile.in
index c2fe69181e..451ecfd432 100644
--- a/libraries/libldap/Makefile.in
+++ b/libraries/libldap/Makefile.in
@@ -28,7 +28,7 @@ SRCS	= bind.c open.c result.c error.c compare.c search.c \
 	charray.c os-local.c dnssrv.c utf-8.c utf-8-conv.c \
 	tls2.c tls_o.c tls_g.c tls_m.c \
 	turn.c ppolicy.c dds.c txn.c ldap_sync.c stctrl.c \
-	assertion.c deref.c
+	assertion.c deref.c ldif.c fetch.c
 
 OBJS	= bind.lo open.lo result.lo error.lo compare.lo search.lo \
 	controls.lo messages.lo references.lo extended.lo cyrus.lo \
@@ -41,7 +41,7 @@ OBJS	= bind.lo open.lo result.lo error.lo compare.lo search.lo \
 	charray.lo os-local.lo dnssrv.lo utf-8.lo utf-8-conv.lo \
 	tls2.lo tls_o.lo tls_g.lo tls_m.lo \
 	turn.lo ppolicy.lo dds.lo txn.lo ldap_sync.lo stctrl.lo \
-	assertion.lo deref.lo
+	assertion.lo deref.lo ldif.lo fetch.lo
 
 LDAP_INCDIR= ../../include       
 LDAP_LIBDIR= ../../libraries
diff --git a/libraries/liblutil/fetch.c b/libraries/libldap/fetch.c
similarity index 100%
rename from libraries/liblutil/fetch.c
rename to libraries/libldap/fetch.c
diff --git a/libraries/liblutil/ldif.c b/libraries/libldap/ldif.c
similarity index 100%
rename from libraries/liblutil/ldif.c
rename to libraries/libldap/ldif.c
diff --git a/libraries/libldap_r/Makefile.in b/libraries/libldap_r/Makefile.in
index 4b5f8586e7..5bdcd6b439 100644
--- a/libraries/libldap_r/Makefile.in
+++ b/libraries/libldap_r/Makefile.in
@@ -30,7 +30,7 @@ XXSRCS    = apitest.c test.c \
 	charray.c os-local.c dnssrv.c utf-8.c utf-8-conv.c \
 	tls2.c tls_o.c tls_g.c tls_m.c \
 	turn.c ppolicy.c dds.c txn.c ldap_sync.c stctrl.c \
-	assertion.c deref.c
+	assertion.c deref.c ldif.c fetch.c
 SRCS	= threads.c rdwr.c rmutex.c tpool.c rq.c \
 	thr_posix.c thr_cthreads.c thr_thr.c thr_nt.c \
 	thr_pth.c thr_stub.c thr_debug.c
@@ -48,7 +48,7 @@ OBJS	= threads.lo rdwr.lo rmutex.lo tpool.lo  rq.lo \
 	charray.lo os-local.lo dnssrv.lo utf-8.lo utf-8-conv.lo \
 	tls2.lo tls_o.lo tls_g.lo tls_m.lo \
 	turn.lo ppolicy.lo dds.lo txn.lo ldap_sync.lo stctrl.lo \
-	assertion.lo deref.lo
+	assertion.lo deref.lo ldif.lo fetch.lo
 
 LDAP_INCDIR= ../../include       
 LDAP_LIBDIR= ../../libraries
diff --git a/libraries/liblutil/Makefile.in b/libraries/liblutil/Makefile.in
index cc78424946..06da05c951 100644
--- a/libraries/liblutil/Makefile.in
+++ b/libraries/liblutil/Makefile.in
@@ -29,14 +29,14 @@ XLIBS = $(LIBRARY) $(LDAP_LIBLBER_LA)
 
 SRCS	= base64.c entropy.c sasl.c signal.c hash.c passfile.c \
 	md5.c passwd.c sha1.c getpass.c lockf.c utils.c uuid.c sockpair.c \
-	avl.c tavl.c ldif.c fetch.c \
+	avl.c tavl.c \
 	testavl.c \
 	meter.c \
 	@LIBSRCS@ $(@PLAT@_SRCS)
 
 OBJS	= base64.o entropy.o sasl.o signal.o hash.o passfile.o \
 	md5.o passwd.o sha1.o getpass.o lockf.o utils.o uuid.o sockpair.o \
-	avl.o tavl.o ldif.o fetch.o \
+	avl.o tavl.o \
 	meter.o \
 	@LIBOBJS@ $(@PLAT@_OBJS)
 
diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c
index df6d0962d9..21821aafdd 100644
--- a/servers/slapd/daemon.c
+++ b/servers/slapd/daemon.c
@@ -557,8 +557,8 @@ static slap_daemon_st slap_daemon[MAX_DAEMON_THREADS];
 	memset( slap_daemon[t].sd_flags, 0, dtblsize ); \
 	slapd_ws_sockets[t*2] = wake_sds[t][0]; \
 	slapd_ws_sockets[t*2+1] = wake_sds[t][1]; \
-	wake_sds[0] = t*2; \
-	wake_sds[1] = t*2+1; \
+	wake_sds[t][0] = t*2; \
+	wake_sds[t][1] = t*2+1; \
 	slap_daemon[t].sd_nfds = t*2 + 2; \
 	} while ( 0 )
 
-- 
GitLab