View Issue Details

IDProjectCategoryView StatusLast Update
0000829Pgpool-IIEnhancementpublic2024-03-07 22:58
Reportervpa1977 Assigned Topengbo  
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionopen 
Summary0000829: pgpool2 fails to build with -Werror=implicit-function-declaration
Descriptionpgpool2 fails to build with -Werror=implicit-function-declaration.

This is due to Ubuntu enabling -Werror=implict-function-declaration on armhf due to time_t transition[1]

Would it be possible to consider the attached patch to resolve the issue.

[1] https://bugs.launchpad.net/ubuntu/+source/pgpool2/+bug/2055234
Steps To Reproducebuild with CFLAGS including -Werror=implict-function-declaration
TagsNo tags attached.

Activities

vpa1977

2024-03-01 04:15

reporter  

0001-add-missing-header-files-in-autoconf-check.patch (728 bytes)   
From e8ed5e0ae8bf2baf80179202e5c00ef0f4402667 Mon Sep 17 00:00:00 2001
From: Vladimir Petko <vladimir.petko@canonical.com>
Date: Wed, 28 Feb 2024 13:10:18 +1300
Subject: [PATCH 1/2] add missing header files in autoconf check

---
 c-library.m4 | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/c-library.m4 b/c-library.m4
index 74754b20..482d250f 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"
 
-- 
2.40.1

0002-add-LDAP_DEPRECATED-to-include-prototypes-for-deprec.patch (1,185 bytes)   
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

Issue History

Date Modified Username Field Change
2024-03-01 04:15 vpa1977 New Issue
2024-03-01 04:15 vpa1977 File Added: 0001-add-missing-header-files-in-autoconf-check.patch
2024-03-01 04:15 vpa1977 File Added: 0002-add-LDAP_DEPRECATED-to-include-prototypes-for-deprec.patch
2024-03-07 22:58 pengbo Assigned To => pengbo
2024-03-07 22:58 pengbo Status new => assigned