pgpool2.git / summary / log / commit / refs

commit    c56b95a194c842e84d880e14fa4a5942961895ca
Author:   Bo Peng <pengbo@sraoss.co.jp>
Date:     Wed May 01 06:42:10 2024 +0000

    Fixed compiler error with -Werror=implicit-function-declaration
    
    - Add missing header files in autoconf check and
    - Add LDAP_DEPRECATED to include prototypes for deprecated ldap functions
    
    Patch is created by Vladimir Petko.


c-library.m4 | 3 +++ src/auth/pool_hba.c | 2 ++ src/include/auth/pool_hba.h | 1 + 3 files changed, 6 insertions(+) diff --git a/c-library.m4 b/c-library.m4 index 74754b20e..482d250f6 100644 --- a/c-library.m4 +++ b/c-library.m4 @@ -230,6 +230,9 @@ AC_DEFUN([PGAC_FUNC_SNPRINTF_LONG_LONG_INT_FORMAT], AC_CACHE_VAL(pgac_cv_snprintf_long_long_int_format, [for pgac_format in '%lld' '%qd' '%I64d'; do AC_TRY_RUN([#include <stdio.h> +#include <stdlib.h> +#include <string.h> + typedef long long int ac_int64; #define INT64_FORMAT "$pgac_format" diff --git a/src/auth/pool_hba.c b/src/auth/pool_hba.c index f1170f1eb..202195b43 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 8c9e1ab0b..a6e0a1533 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 [parent: 736e7266b5a7]