diff -urNp -x '*.orig' postgresql-13.6.org/src/Makefile.global.in postgresql-13.6/src/Makefile.global.in --- postgresql-13.6.org/src/Makefile.global.in 2022-02-07 22:17:41.000000000 +0100 +++ postgresql-13.6/src/Makefile.global.in 2022-04-04 17:54:23.042839497 +0200 @@ -119,7 +119,7 @@ libdir := @libdir@ pkglibdir = $(libdir) ifeq "$(findstring pgsql, $(pkglibdir))" "" ifeq "$(findstring postgres, $(pkglibdir))" "" -override pkglibdir := $(pkglibdir)/postgresql +override pkglibdir := $(pkglibdir)/postgresql/@PG_MAJORVERSION@/lib endif endif @@ -167,7 +167,7 @@ endif # PGXS # These derived path variables aren't separately configurable. -includedir_server = $(pkgincludedir)/server +includedir_server = $(pkgincludedir)/@PG_MAJORVERSION@/server includedir_internal = $(pkgincludedir)/internal pgxsdir = $(pkglibdir)/pgxs bitcodedir = $(pkglibdir)/bitcode diff -urNp -x '*.orig' postgresql-13.6.org/src/bin/pg_config/pg_config.c postgresql-13.6/src/bin/pg_config/pg_config.c --- postgresql-13.6.org/src/bin/pg_config/pg_config.c 2022-02-07 22:17:41.000000000 +0100 +++ postgresql-13.6/src/bin/pg_config/pg_config.c 2022-04-04 17:54:23.042839497 +0200 @@ -27,6 +27,8 @@ #include "common/config_info.h" #include "port.h" +#include "../port/pg_config_paths.h" + static const char *progname; /* @@ -149,11 +151,7 @@ main(int argc, char **argv) } } - if (find_my_exec(argv[0], my_exec_path) < 0) - { - fprintf(stderr, _("%s: could not find own program executable\n"), progname); - exit(1); - } + snprintf(my_exec_path, sizeof(my_exec_path), "%s/%s", PGBINDIR, progname); configdata = get_configdata(my_exec_path, &configdata_len); /* no arguments -> print everything */