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"