pgpool2.git / summary / log / commit / refs
commit 3158ef278cdc8b2edcbbb5e709d54dfa1f4c8e47
Author: Tatsuo Ishii <ishii@sraoss.co.jp>
Date: Fri Oct 06 21:15:30 2023 +0000
Fix breakage in making pgpool_adm.
Since commit f54efc50 "Fix compiler warnings regarding
DEFAULT_PGSOCKET_DIR.", src/sql/pgpool_adm cannot be compiled with
error:
In file included from pgpool_adm.c:35:0:
../../include/pcp/libpcp_ext.h:32:37: fatal error: parser/pg_config_manual.h: No such file or directory
#include "parser/pg_config_manual.h"
Since pgpool_adm is a PostgreSQL extension module, it should not
include Pgpool-II's pg_config_manual.h. Rather than fixing pgpool_adm
to allow to include pgpool's pg_config_manual.h, modify libpcp_ext.h
so that it does not include pgpool's pg_config_manual.h if PGPOOL_ADM
is defined.
src/include/pcp/libpcp_ext.h | 2 ++
src/sql/pgpool_adm/Makefile | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/include/pcp/libpcp_ext.h b/src/include/pcp/libpcp_ext.h
index a290258be..3c9d1d6bb 100644
--- a/src/include/pcp/libpcp_ext.h
+++ b/src/include/pcp/libpcp_ext.h
@@ -29,7 +29,9 @@
#include <signal.h>
#include <stdio.h>
+#ifndef PGPOOL_ADM
#include "parser/pg_config_manual.h"
+#endif
/*
* startup packet definitions (v2) stolen from PostgreSQL
diff --git a/src/sql/pgpool_adm/Makefile b/src/sql/pgpool_adm/Makefile
index 9dcdd74e5..199772207 100644
--- a/src/sql/pgpool_adm/Makefile
+++ b/src/sql/pgpool_adm/Makefile
@@ -2,7 +2,7 @@
MODULE_big = pgpool_adm
OBJS = pgpool_adm.o
-PG_CPPFLAGS = -I$(libpq_srcdir) -I../../include/pcp
+PG_CPPFLAGS = -I$(libpq_srcdir) -I../../include/pcp -DPGPOOL_ADM
EXTENSION = pgpool_adm
DATA = pgpool_adm--1.0.sql pgpool_adm--1.1.sql pgpool_adm--1.2.sql pgpool_adm--1.3.sql \
[parent: 652d7719535a]