[PATCH gnupg] dirmngr:w32: Fix ldap_* types

Zhang Maiyun via Gnupg-devel <[email protected]>
Newsgroups gmane.comp.encryption.gpg.devel
Message-ID <[email protected]>
From: Zhang Maiyun <[email protected]>

* dirmngr/ks-engine-ldap.c: when compiling with Windows/MinGW headers,
  `ldap_parse_page_control` and `ldap_parse_result` expects `ULONG`.
  This has become a hard error when using GCC 15.

Signed-off-by: Zhang Maiyun <[email protected]>
---
 dirmngr/ks-engine-ldap.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/dirmngr/ks-engine-ldap.c b/dirmngr/ks-engine-ldap.c
index 4ad021b73..88dcec270 100644
--- a/dirmngr/ks-engine-ldap.c
+++ b/dirmngr/ks-engine-ldap.c
@@ -1356,10 +1356,16 @@ search_and_parse (ctrl_t ctrl, const char *keyspec,
                   char **attrs, LDAPMessage **r_message)
 {
   gpg_error_t err = 0;
-  int l_err, l_reserr;
+  int l_err;
+#ifdef HAVE_W32_SYSTEM
+  ULONG l_reserr;
+  ULONG totalcount = 0;
+#else
+  int l_reserr;
+  unsigned int totalcount = 0;
+#endif
   LDAPControl *srvctrls[2] = { NULL, NULL };
   int count;
-  unsigned int totalcount = 0;
   LDAPControl *pagectrl = NULL;
   LDAPControl **resctrls = NULL;
 
-- 
2.49.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.