1 diff -urpa postgresql-9.5.14.orig/src/bin/pg_config/pg_config.c postgresql-9.5.14/src/bin/pg_config/pg_config.c
2 --- postgresql-9.5.14.orig/src/bin/pg_config/pg_config.c 2018-08-23 13:41:50.944654284 +0000
3 +++ postgresql-9.5.14/src/bin/pg_config/pg_config.c 2018-08-23 13:42:31.233653830 +0000
8 +#include "../port/pg_config_paths.h"
10 static const char *progname;
11 static char mypath[MAXPGPATH];
13 @@ -481,7 +483,6 @@ main(int argc, char **argv)
19 set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pg_config"));
21 @@ -497,13 +498,7 @@ main(int argc, char **argv)
25 - ret = find_my_exec(argv[0], mypath);
29 - fprintf(stderr, _("%s: could not find own program executable\n"), progname);
32 + snprintf(mypath, sizeof(mypath), "%s/%s", PGBINDIR, progname);
34 /* no arguments -> print everything */
36 diff -urpa postgresql-9.5.14.orig/src/Makefile.global.in postgresql-9.5.14/src/Makefile.global.in
37 --- postgresql-9.5.14.orig/src/Makefile.global.in 2018-08-23 13:41:50.825654285 +0000
38 +++ postgresql-9.5.14/src/Makefile.global.in 2018-08-23 13:42:31.233653830 +0000
39 @@ -120,7 +120,7 @@ libdir := @libdir@
41 ifeq "$(findstring pgsql, $(pkglibdir))" ""
42 ifeq "$(findstring postgres, $(pkglibdir))" ""
43 -override pkglibdir := $(pkglibdir)/postgresql
44 +override pkglibdir := $(pkglibdir)/postgresql/@PG_MAJORVERSION@/lib
48 @@ -168,7 +168,7 @@ endif # PGXS
50 # These derived path variables aren't separately configurable.
52 -includedir_server = $(pkgincludedir)/server
53 +includedir_server = $(pkgincludedir)/@PG_MAJORVERSION@/server
54 includedir_internal = $(pkgincludedir)/internal
55 pgxsdir = $(pkglibdir)/pgxs