diff mbox series

[meta-networking,2/3] pgpool2: Fix build with postgresql 16+

Message ID 20240305190745.3586645-2-raj.khem@gmail.com
State Accepted, archived
Headers show
Series [meta-networking,1/3] pgpool2: Upgrade to 4.5.1 | expand

Commit Message

Khem Raj March 5, 2024, 7:07 p.m. UTC
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../pgpool2/pgpool2/define_SIGNAL_ARGS.patch  | 25 +++++++++++++++++++
 .../recipes-support/pgpool2/pgpool2_4.5.1.bb  |  1 +
 2 files changed, 26 insertions(+)
 create mode 100644 meta-networking/recipes-support/pgpool2/pgpool2/define_SIGNAL_ARGS.patch
diff mbox series

Patch

diff --git a/meta-networking/recipes-support/pgpool2/pgpool2/define_SIGNAL_ARGS.patch b/meta-networking/recipes-support/pgpool2/pgpool2/define_SIGNAL_ARGS.patch
new file mode 100644
index 0000000000..3ae9b1bd9a
--- /dev/null
+++ b/meta-networking/recipes-support/pgpool2/pgpool2/define_SIGNAL_ARGS.patch
@@ -0,0 +1,25 @@ 
+Define SIGNAL_ARGS if its not defined, this is flagged with
+newer C compilers e.g. clang18, where if it is not defined
+then it ends up with compiler errors
+
+/usr/include/postgresql/server/port.h:488:28: error: a parameter l
+ist without types is only allowed in a function definition
+|   488 | typedef void (*pqsigfunc) (SIGNAL_ARGS);
+|       |                            ^
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+--- a/src/include/pool_type.h
++++ b/src/include/pool_type.h
+@@ -125,7 +125,9 @@ extern void ExceptionalCondition(const c
+ #define LONGALIGN(LEN)			TYPEALIGN(ALIGNOF_LONG, (LEN))
+ #define DOUBLEALIGN(LEN)		TYPEALIGN(ALIGNOF_DOUBLE, (LEN))
+ #define MAXALIGN(LEN)			TYPEALIGN(MAXIMUM_ALIGNOF, (LEN))
+-
++#ifndef SIGNAL_ARGS
++#define SIGNAL_ARGS  int postgres_signal_arg
++#endif
+ /*
+  *  It seems that sockaddr_storage is now commonly used in place of sockaddr.
+  *  So, define it if it is not define yet, and create new SockAddr structure
diff --git a/meta-networking/recipes-support/pgpool2/pgpool2_4.5.1.bb b/meta-networking/recipes-support/pgpool2/pgpool2_4.5.1.bb
index b127d69625..ffb879952c 100644
--- a/meta-networking/recipes-support/pgpool2/pgpool2_4.5.1.bb
+++ b/meta-networking/recipes-support/pgpool2/pgpool2_4.5.1.bb
@@ -12,6 +12,7 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=e4b38de086d73e0521de0bbdbaa4a1a9"
 
 SRC_URI = "http://www.pgpool.net/mediawiki/images/pgpool-II-${PV}.tar.gz \
 	   file://0001-Fix-build-error-when-build-this-file.patch \
+	   file://define_SIGNAL_ARGS.patch \
 	   file://pgpool.sysconfig \
 	   file://pgpool.service \
            "