e7adf7b
diff -up gambas-3.14.3/gb.db.postgresql/src/main.c.orig gambas-3.14.3/gb.db.postgresql/src/main.c
e7adf7b
--- gambas-3.14.3/gb.db.postgresql/src/main.c.orig	2020-06-22 21:31:16.035953348 +0200
e7adf7b
+++ gambas-3.14.3/gb.db.postgresql/src/main.c	2020-06-22 21:33:38.812290889 +0200
e7adf7b
@@ -33,6 +33,42 @@
e7adf7b
 #include <postgres.h>
e7adf7b
 #include <pg_type.h>
e7adf7b
 
e7adf7b
+// Starting v12, PostgreSQL (libpq) redefins printf symbol but the
e7adf7b
+// implementation is not exported.
e7adf7b
+// This should work-around the issue before a more robust solution is found.
e7adf7b
+// PostgreSQL commit that caused this:
e7adf7b
+// https://github.com/postgres/postgres/commit/96bf88d5271
e7adf7b
+#ifdef vsnprintf
e7adf7b
+#undef vsnprintf
e7adf7b
+#endif
e7adf7b
+#ifdef snprintf
e7adf7b
+#undef snprintf
e7adf7b
+#endif
e7adf7b
+#ifdef vsprintf
e7adf7b
+#undef vsprintf
e7adf7b
+#endif
e7adf7b
+#ifdef sprintf
e7adf7b
+#undef sprintf
e7adf7b
+#endif
e7adf7b
+#ifdef vfprintf
e7adf7b
+#undef vfprintf
e7adf7b
+#endif
e7adf7b
+#ifdef fprintf
e7adf7b
+#undef fprintf
e7adf7b
+#endif
e7adf7b
+#ifdef vprintf
e7adf7b
+#undef vprintf
e7adf7b
+#endif
e7adf7b
+#ifdef printf
e7adf7b
+#undef printf
e7adf7b
+#endif
e7adf7b
+#ifdef strerror
e7adf7b
+#undef strerror
e7adf7b
+#endif
e7adf7b
+#ifdef strerror_r
e7adf7b
+#undef strerror_r
e7adf7b
+#endif
e7adf7b
+
e7adf7b
 #ifdef PACKAGE_NAME
e7adf7b
 	#undef PACKAGE_NAME
e7adf7b
 	#undef PACKAGE_BUGREPORT