diff --git a/gambas3-3.14.3-printf.patch b/gambas3-3.14.3-printf.patch new file mode 100644 index 0000000..892ae35 --- /dev/null +++ b/gambas3-3.14.3-printf.patch @@ -0,0 +1,46 @@ +diff -up gambas-3.14.3/gb.db.postgresql/src/main.c.orig gambas-3.14.3/gb.db.postgresql/src/main.c +--- gambas-3.14.3/gb.db.postgresql/src/main.c.orig 2020-06-22 21:31:16.035953348 +0200 ++++ gambas-3.14.3/gb.db.postgresql/src/main.c 2020-06-22 21:33:38.812290889 +0200 +@@ -33,6 +33,42 @@ + #include + #include + ++// Starting v12, PostgreSQL (libpq) redefins printf symbol but the ++// implementation is not exported. ++// This should work-around the issue before a more robust solution is found. ++// PostgreSQL commit that caused this: ++// https://github.com/postgres/postgres/commit/96bf88d5271 ++#ifdef vsnprintf ++#undef vsnprintf ++#endif ++#ifdef snprintf ++#undef snprintf ++#endif ++#ifdef vsprintf ++#undef vsprintf ++#endif ++#ifdef sprintf ++#undef sprintf ++#endif ++#ifdef vfprintf ++#undef vfprintf ++#endif ++#ifdef fprintf ++#undef fprintf ++#endif ++#ifdef vprintf ++#undef vprintf ++#endif ++#ifdef printf ++#undef printf ++#endif ++#ifdef strerror ++#undef strerror ++#endif ++#ifdef strerror_r ++#undef strerror_r ++#endif ++ + #ifdef PACKAGE_NAME + #undef PACKAGE_NAME + #undef PACKAGE_BUGREPORT diff --git a/gambas3.spec b/gambas3.spec index 744aa1e..1ce6e27 100644 --- a/gambas3.spec +++ b/gambas3.spec @@ -40,6 +40,7 @@ Patch1: %{name}-3.12.2-nolintl.patch Patch2: %{name}-3.12.2-noliconv.patch Patch4: %{name}-3.13.0-poppler-0.73.0.patch Patch5: %{name}-3.14.1-gst1.patch +Patch6: %{name}-3.14.3-printf.patch %description Gambas3 is a free development environment based on a Basic interpreter @@ -872,6 +873,7 @@ Requires: %{name}-gb-xml = %{version}-%{release} %patch2 -p1 -b .noliconv %patch4 -p1 -b .poppler_0.73.0 %patch5 -p1 -b .gst1 +%patch6 -p1 -b .printf for i in `find . |grep acinclude.m4`; do sed -i 's|$AM_CFLAGS -O3|$AM_CFLAGS|g' $i sed -i 's|$AM_CXXFLAGS -Os -fno-omit-frame-pointer|$AM_CXXFLAGS|g' $i