pgpool2: Fix build with postgresql 16+

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj 2024-03-05 11:00:50 -08:00
parent 39b2535123
commit 455409badd
No known key found for this signature in database
GPG Key ID: BB053355919D3314
2 changed files with 26 additions and 0 deletions

View File

@ -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

View File

@ -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 \
"