From: Quanah Gibson-Mount <quanah@fast-mail.org>
Date: Tue, 21 Oct 2025 15:52:36 -0700
Subject: Bug#1066630: libnet-ldapapi-perl: FTBFS: LDAPapi.c

Origin: upstream, https://github.com/quanah/net-ldapapi
Applied-Upstream: https://github.com/quanah/net-ldapapi/commit/0b7b45808bb644acfef4cd703d8d167e3a09007f
Reviewed-by: Bill MacAllister <bill@ca-zephyr.org>

This bug was caused by a change in dpkg 1.22.6, that enabled
-Werror=implicit-function-declaration.  In dpkg version 1.22.6, the
compiler flag -Werror=implicit-function-declaration was enabled by
default for all architectures in build flags (in dpkg 1.22.5 it had
been enabled conditionally on the abi time64 feature, so only on most
32-bit architectures). The reason for doing this is avoiding
misbehavior of software affected by the ReleaseGoals/64bit-time
transition. When using a function with a time_t argument with an
implicit declaration, its type would be assumed to be int causing
silent truncation, or no symbol redirection (to their _time64
counterparts) would take effect.
Reviewed-by: Bill MacAllister <bill@ca-zephyr.org>
---
 Makefile.PL | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile.PL b/Makefile.PL
index fcb8f8c..089240e 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -124,7 +124,7 @@ WriteMakefile(
 	'DEFINE'        =>      '-DMOZILLA_LDAP',
 	) : (
 	'LIBS'          =>      ["-L$lib_ldap $ldap_lib"],
-	'DEFINE'        =>      '-DOPENLDAP',
+	'DEFINE'        =>      '-DOPENLDAP -DLDAP_DEPRECATED=1',
 	)),
 	'depend'        =>      { 'LDAPapi.c' => 'constant.h' },
 	'clean'         =>      { 'FILES'     => 'constant.h' },
