postgresql: Enable package
[termux-packages] / packages / postgresql / src-timezone-zic.c.patch.beforehostbuild
CommitLineData
b09bf60c 1diff -u -r ../postgresql-9.6.2/src/timezone/zic.c ./src/timezone/zic.c
b69a8220
FF
2--- ../postgresql-9.6.2/src/timezone/zic.c 2017-02-06 22:45:25.000000000 +0100
3+++ ./src/timezone/zic.c 2017-03-08 01:51:31.199705267 +0100
4@@ -19,6 +19,12 @@
5 #include "private.h"
6 #include "tzfile.h"
7
8+/*
9+ * Avoid the qsort->pg_qsort define to more easily build
10+ * a native patched zic tool.
11+ */
12+#undef qsort
13+
14 #define ZIC_VERSION_PRE_2013 '2'
15 #define ZIC_VERSION '3'
16
17@@ -881,8 +887,16 @@
b09bf60c
FF
18 progname, directory, fromfield, strerror(EPERM));
19 exit(EXIT_FAILURE);
20 }
b69a8220 21+#if 1
b09bf60c
FF
22+ /*
23+ * Android does not support hard links starting from 6.0
24+ * so always use symlinks.
25+ */
26+ staysymlink = true;
27+#else
28 if (staysymlink)
29 staysymlink = itssymlink(tofield);
30+#endif
31 if (remove(tofield) == 0)
32 todirs_made = true;
33 else if (errno != ENOENT)