1 diff -ur postgresql-14.0.orig/src/bin/pg_config/pg_config.c postgresql-14.0/src/bin/pg_config/pg_config.c
2 --- postgresql-14.0.orig/src/bin/pg_config/pg_config.c 2021-11-01 14:48:22.654149731 +0100
3 +++ postgresql-14.0/src/bin/pg_config/pg_config.c 2021-11-01 14:49:14.747282545 +0100
5 #include "common/config_info.h"
8 +#include "../port/pg_config_paths.h"
10 static const char *progname;
17 - if (find_my_exec(argv[0], my_exec_path) < 0)
19 - fprintf(stderr, _("%s: could not find own program executable\n"), progname);
22 + snprintf(my_exec_path, sizeof(my_exec_path), "%s/%s", PGBINDIR, progname);
24 configdata = get_configdata(my_exec_path, &configdata_len);
25 /* no arguments -> print everything */
26 diff -ur postgresql-14.0.orig/src/Makefile.global.in postgresql-14.0/src/Makefile.global.in
27 --- postgresql-14.0.orig/src/Makefile.global.in 2021-11-01 14:48:22.456149226 +0100
28 +++ postgresql-14.0/src/Makefile.global.in 2021-11-01 14:49:14.747282545 +0100
31 ifeq "$(findstring pgsql, $(pkglibdir))" ""
32 ifeq "$(findstring postgres, $(pkglibdir))" ""
33 -override pkglibdir := $(pkglibdir)/postgresql
34 +override pkglibdir := $(pkglibdir)/postgresql/@PG_MAJORVERSION@/lib
40 # These derived path variables aren't separately configurable.
42 -includedir_server = $(pkgincludedir)/server
43 +includedir_server = $(pkgincludedir)/@PG_MAJORVERSION@/server
44 includedir_internal = $(pkgincludedir)/internal
45 pgxsdir = $(pkglibdir)/pgxs
46 bitcodedir = $(pkglibdir)/bitcode