From 441c1838035aee4e6b33b8deee4646e65ad1ed47 Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Fri, 1 Oct 2010 08:11:37 +0000 Subject: use AC_CHECK_DECLS to check for definitions of functions we provide a replacement definition for git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1233 ef36b2f9-881f-0410-afb5-c4e39611909c --- compat/ether.c | 8 ++++---- compat/ldap_passwd_s.c | 6 ++++-- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'compat') diff --git a/compat/ether.c b/compat/ether.c index 28dadf3..f02576c 100644 --- a/compat/ether.c +++ b/compat/ether.c @@ -37,11 +37,11 @@ #ifndef HAVE_ETHER_NTOA_R -#ifndef HAVE_ETHER_NTOA_DEFINED +#if !HAVE_DECL_ETHER_NTOA /* we define ether_ntoa() here because on some platforms the function is underfined */ extern char *ether_ntoa(const struct ether_addr *e); -#endif /* not HAVE_ETHER_NTOA_DEFINED */ +#endif /* not HAVE_DECL_ETHER_NTOA */ char *ether_ntoa_r(const struct ether_addr *addr,char *buf) { @@ -56,11 +56,11 @@ char *ether_ntoa_r(const struct ether_addr *addr,char *buf) #ifndef HAVE_ETHER_ATON_R -#ifndef HAVE_ETHER_ATON_DEFINED +#if !HAVE_DECL_ETHER_ATON /* we define ether_aton() here because on some platforms the function is underfined */ extern struct ether_addr *ether_aton(const char *s); -#endif /* not HAVE_ETHER_ATON_DEFINED */ +#endif /* not HAVE_DECL_ETHER_ATON */ struct ether_addr *ether_aton_r(const char *asc,struct ether_addr *addr) { diff --git a/compat/ldap_passwd_s.c b/compat/ldap_passwd_s.c index 97fcb3c..85825cb 100644 --- a/compat/ldap_passwd_s.c +++ b/compat/ldap_passwd_s.c @@ -4,7 +4,7 @@ (taken from _update_authtok() in pam_ldap.c). Copyright (C) 1998-2004 Luke Howard - Copyright (C) 2009 Arthur de Jong + Copyright (C) 2009, 2010 Arthur de Jong This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -53,11 +53,13 @@ #define ber_memfree free #endif /* not HAVE_BER_MEMFREE */ +#if !HAVE_DECL_LDAP_EXTENDED_OPERATION_S /* we define this ourselves here because some LDAP header versions don't seem to define this */ -int ldap_extended_operation_s(LDAP *ld,LDAP_CONST char *reqoid, +extern int ldap_extended_operation_s(LDAP *ld,LDAP_CONST char *reqoid, struct berval *reqdata,LDAPControl **serverctrls,LDAPControl **clientctrls, char **retoidp,struct berval **retdatap); +#endif /* not HAVE_DECL_LDAP_EXTENDED_OPERATION_S */ /* Replacement for password modification. user is the DN of the entry to change, oldpw is the old password (may not always be needed?), newpw is -- cgit v1.2.3