From 97ea2762fcca4d1eb0d3f2f4549659ce8b03ecbd Mon Sep 17 00:00:00 2001
From: Vladimir Petko <vladimir.petko@canonical.com>
Date: Wed, 28 Feb 2024 13:10:55 +1300
Subject: [PATCH 2/2] add LDAP_DEPRECATED to include prototypes for deprecated
 ldap functions

---
 src/auth/pool_hba.c         | 2 ++
 src/include/auth/pool_hba.h | 1 +
 2 files changed, 3 insertions(+)

diff --git a/src/auth/pool_hba.c b/src/auth/pool_hba.c
index f1170f1e..202195b4 100644
--- a/src/auth/pool_hba.c
+++ b/src/auth/pool_hba.c
@@ -52,6 +52,7 @@
 #include "protocol/pool_process_query.h"
 
 #ifdef USE_LDAP
+#define LDAP_DEPRECATED 1
 #include <ldap.h>
 #endif
 
@@ -168,6 +169,7 @@ static POOL_CONNECTION * pam_frontend_kludge;	/* Workaround for passing
 #endif							/* USE_PAM */
 
 #ifdef USE_LDAP
+#define LDAP_DEPRECATED 1
 #include <ldap.h>
 
 static POOL_STATUS CheckLDAPAuth(POOL_CONNECTION *frontend);
diff --git a/src/include/auth/pool_hba.h b/src/include/auth/pool_hba.h
index 8c9e1ab0..a6e0a153 100644
--- a/src/include/auth/pool_hba.h
+++ b/src/include/auth/pool_hba.h
@@ -30,6 +30,7 @@
 #include "pool.h"
 
 #ifdef USE_LDAP
+#define LDAP_DEPRECATED 1
 #include  <ldap.h>
 #endif
 
-- 
2.40.1

