commit:     cca651c42af37ab0695b1073828a00aed3e8bee2
Author:     Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 14 08:48:21 2019 +0000
Commit:     Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
CommitDate: Fri Jun 14 08:49:12 2019 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=cca651c4

net-nds/openldap: add winnt patch

Package-Manager: Portage-2.3.66, Repoman-2.3.11
Signed-off-by: Michael Haubenwallner <haubi <AT> gentoo.org>

 net-nds/openldap/files/openldap-2.4.45-winnt.patch | 80 ++++++++++++++++++++++
 net-nds/openldap/openldap-2.4.45.ebuild            |  5 +-
 2 files changed, 84 insertions(+), 1 deletion(-)

diff --git a/net-nds/openldap/files/openldap-2.4.45-winnt.patch 
b/net-nds/openldap/files/openldap-2.4.45-winnt.patch
new file mode 100644
index 0000000000..e4af03e5fc
--- /dev/null
+++ b/net-nds/openldap/files/openldap-2.4.45-winnt.patch
@@ -0,0 +1,80 @@
+diff -ru openldap-2.4.45.gentoo/configure.in openldap-2.4.45/configure.in
+--- openldap-2.4.45.gentoo/configure.in        2019-06-14 09:59:09.295425100 
+0200
++++ openldap-2.4.45/configure.in       2019-06-14 10:02:08.279864200 +0200
+@@ -821,6 +821,7 @@
+       locale.h                \
+       malloc.h                \
+       memory.h                \
++      netinet/in.h            \
+       psap.h                  \
+       pwd.h                   \
+       process.h               \
+@@ -862,12 +863,16 @@
+ 
+ AC_CHECK_HEADERS( resolv.h, [], [],
+ [$ac_includes_default
++#ifdef HAVE_NETINET_IN_H
+ #include <netinet/in.h>
++#endif
+ ])
+ 
+ AC_CHECK_HEADERS( netinet/tcp.h, [], [],
+ [$ac_includes_default
++#ifdef HAVE_NETINET_IN_H
+ #include <netinet/in.h>
++#endif
+ ])
+ 
+ AC_CHECK_HEADERS( sys/ucred.h, [], [],
+@@ -2429,9 +2434,11 @@
+ dnl Check for NT specific routines
+ AC_CHECK_FUNC(_spawnlp, AC_DEFINE(HAVE_SPAWNLP,1,[if you have spawnlp()]))
+ 
+-AC_CHECK_FUNC(_snprintf, [ac_cv_func_snprintf=yes
++AC_CHECK_FUNCS(snprintf)
++
++AC_CHECK_FUNC(_snprintf, [if test $ac_cv_func_snprintf = no ; then
+       AC_DEFINE(snprintf, _snprintf, [define to snprintf routine])
+-])
++fi])
+ 
+ AC_CHECK_FUNCS(vsnprintf _vsnprintf)
+ 
+@@ -2444,7 +2451,7 @@
+ 
+ if test $ac_cv_func_vprintf = yes ; then
+       dnl check for vsnprintf
+-      AC_CHECK_FUNCS(snprintf vsnprintf)
++      AC_CHECK_FUNCS(vsnprintf)
+ fi
+ 
+ AC_CHECK_FUNCS(                       \
+diff -ru openldap-2.4.45.gentoo/include/ac/socket.h 
openldap-2.4.45/include/ac/socket.h
+--- openldap-2.4.45.gentoo/include/ac/socket.h 2017-06-01 22:01:07.000000000 
+0200
++++ openldap-2.4.45/include/ac/socket.h        2019-06-14 10:02:08.279864200 
+0200
+@@ -38,7 +38,9 @@
+ #include <sys/select.h>
+ #endif
+ 
++#ifdef HAVE_NETINET_IN_H
+ #include <netinet/in.h>
++#endif
+ 
+ #ifdef HAVE_NETINET_TCP_H
+ #include <netinet/tcp.h>
+@@ -98,9 +100,15 @@
+ #             define tcp_close( s )           closesocket( s )
+ #     endif
+ 
++#ifndef EWOULDBLOCK
+ #define EWOULDBLOCK WSAEWOULDBLOCK
++#endif
++#ifndef EINPROGRESS
+ #define EINPROGRESS WSAEINPROGRESS
++#endif
++#ifndef ETIMEDOUT
+ #define ETIMEDOUT     WSAETIMEDOUT
++#endif
+ 
+ #undef        sock_errno
+ #undef        sock_errstr

diff --git a/net-nds/openldap/openldap-2.4.45.ebuild 
b/net-nds/openldap/openldap-2.4.45.ebuild
index e6bf0b44ed..b765d60650 100644
--- a/net-nds/openldap/openldap-2.4.45.ebuild
+++ b/net-nds/openldap/openldap-2.4.45.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="5"
@@ -343,6 +343,9 @@ src_prepare() {
        # bug #622464
        epatch "${FILESDIR}"/${PN}-2.4.45-libressl.patch
 
+       # winnt (using parity)
+       epatch "${FILESDIR}"/${PN}-2.4.45-winnt.patch
+
        # unbundle lmdb
        epatch "${FILESDIR}"/${PN}-2.4.42-mdb-unbundle.patch
        rm -rf "${S}"/libraries/liblmdb

Reply via email to