postgresql: Build with bundled time zone database
[termux-packages] / disabled-packages / postgresql / src-timezone-zic.c.patch.beforehostbuild
@@ -1,11 +1,24 @@
 diff -u -r ../postgresql-9.6.2/src/timezone/zic.c ./src/timezone/zic.c
---- ../postgresql-9.6.2/src/timezone/zic.c     2017-02-06 21:45:25.000000000 +0000
-+++ ./src/timezone/zic.c       2017-03-06 02:22:14.841276917 +0000
-@@ -881,8 +881,16 @@
+--- ../postgresql-9.6.2/src/timezone/zic.c     2017-02-06 22:45:25.000000000 +0100
++++ ./src/timezone/zic.c       2017-03-08 01:51:31.199705267 +0100
+@@ -19,6 +19,12 @@
+ #include "private.h"
+ #include "tzfile.h"
++/*
++ * Avoid the qsort->pg_qsort define to more easily build
++ * a native patched zic tool.
++ */
++#undef qsort
++
+ #define ZIC_VERSION_PRE_2013 '2'
+ #define ZIC_VERSION '3'
+@@ -881,8 +887,16 @@
                                progname, directory, fromfield, strerror(EPERM));
                exit(EXIT_FAILURE);
        }
-+#ifdef __ANDROID__
++#if 1
 +      /*
 +       * Android does not support hard links starting from 6.0
 +       * so always use symlinks.