diff --git a/mysql-abi-check.patch b/mysql-abi-check.patch new file mode 100644 index 0000000..5695ead --- /dev/null +++ b/mysql-abi-check.patch @@ -0,0 +1,57 @@ +Fix "ABI check" that doesn't work on gcc >= 4.5, or indeed any compiler that +aborts on missing #include's. Per http://bugs.mysql.com/bug.php?id=52514 + + +diff -Naur mysql-5.1.48.orig/Makefile.am mysql-5.1.48/Makefile.am +--- mysql-5.1.48.orig/Makefile.am 2010-06-03 11:50:10.000000000 -0400 ++++ mysql-5.1.48/Makefile.am 2010-07-14 10:39:06.274186484 -0400 +@@ -275,10 +275,7 @@ + # + # 1) Generate preprocessor output for the files that need to + # be tested for abi/api changes. use -nostdinc to prevent +-# generation of preprocessor output for system headers. This +-# results in messages in stderr saying that these headers +-# were not found. Redirect the stderr output to /dev/null +-# to prevent seeing these messages. ++# generation of preprocessor output for system headers. + # 2) sed the output to + # 2.1) remove blank lines and lines that begin with "# " + # 2.2) When gcc -E is run on the Mac OS and solaris sparc platforms it +@@ -314,14 +311,14 @@ + do_abi_check: + set -ex; \ + for file in $(abi_headers); do \ +- @CC@ -E -nostdinc -dI \ ++ @CC@ -E -nostdinc -dI -DMYSQL_ABI_CHECK \ + -I$(top_srcdir)/include \ + -I$(top_srcdir)/include/mysql \ + -I$(top_srcdir)/sql \ + -I$(top_builddir)/include \ + -I$(top_builddir)/include/mysql \ + -I$(top_builddir)/sql \ +- $$file 2>/dev/null | \ ++ $$file | \ + @SED@ -e '/^# /d' \ + -e '/^[ ]*$$/d' \ + -e '/^#pragma GCC set_debug_pwd/d' \ +diff -Naur mysql-5.1.48.orig/include/mysql.h mysql-5.1.48/include/mysql.h +--- mysql-5.1.48.orig/include/mysql.h 2010-06-03 11:50:21.000000000 -0400 ++++ mysql-5.1.48/include/mysql.h 2010-07-14 10:35:53.489148781 -0400 +@@ -44,7 +44,9 @@ + #endif + + #ifndef _global_h /* If not standard header */ ++#ifndef MYSQL_ABI_CHECK + #include ++#endif + #ifdef __LCC__ + #include /* For windows */ + #endif +diff -Naur mysql-5.1.48.orig/include/mysql.h.pp mysql-5.1.48/include/mysql.h.pp +--- mysql-5.1.48.orig/include/mysql.h.pp 2010-06-03 11:50:12.000000000 -0400 ++++ mysql-5.1.48/include/mysql.h.pp 2010-07-14 10:35:53.491151797 -0400 +@@ -1,4 +1,3 @@ +-#include + typedef char my_bool; + typedef int my_socket; + #include "mysql_version.h" diff --git a/mysql.spec b/mysql.spec index 4e1ad71..5b5bb0d 100644 --- a/mysql.spec +++ b/mysql.spec @@ -1,6 +1,6 @@ Name: mysql Version: 5.1.48 -Release: 2%{?dist} +Release: 3%{?dist} Summary: MySQL client programs and shared libraries Group: Applications/Databases URL: http://www.mysql.com @@ -44,6 +44,7 @@ Patch13: mysql-expired-certs.patch Patch14: mysql-missing-string-code.patch Patch15: mysql-lowercase-bug.patch Patch16: mysql-chain-certs.patch +Patch17: mysql-abi-check.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: gperf, perl, readline-devel, openssl-devel @@ -184,6 +185,7 @@ the MySQL sources. %patch14 -p1 %patch15 -p1 %patch16 -p1 +%patch17 -p1 libtoolize --force aclocal @@ -574,6 +576,10 @@ fi %{_mandir}/man1/mysql_client_test.1* %changelog +* Wed Jul 14 2010 Tom Lane 5.1.48-3 +- Fix FTBFS with gcc 4.5. +Related: #614293 + * Tue Jul 13 2010 Tom Lane 5.1.48-2 - Duplicate COPYING and EXCEPTIONS-CLIENT in -libs and -embedded subpackages, to ensure they are available when any subset of mysql RPMs are installed,