diff options
author | Staale Smedseng <staale.smedseng@sun.com> | 2009-07-08 16:49:45 +0200 |
---|---|---|
committer | Staale Smedseng <staale.smedseng@sun.com> | 2009-07-08 16:49:45 +0200 |
commit | ab2f3dd2a2d23d2b96604515ddc0576b54ad8049 (patch) | |
tree | d8b514d1f32d09a3bb9e4f203f7e8db79b8b9795 /libmysql | |
parent | ead1ce94e61b0e4436def29515c2e15c95a9b1aa (diff) | |
download | mariadb-git-ab2f3dd2a2d23d2b96604515ddc0576b54ad8049.tar.gz |
Bug #43397 mysql headers redefine pthread_mutex_init
unnecessarily
The problem is that libmysqlclient.so is built with THREAD
undefined, while a client compiling against the same header
files will see THREAD as defined and definitions in
my_pthread.h will be included, possibly resulting in undefined
symbols that cannot be resolved with libmysqlclient.so.
The suggested solution is to require that clients wanting to
link with libmysqlclient.so should be built with
MYSQL_CLIENT_NO_THREADS defined. This requires a documentation
change, and more details for this will be supplied if this
patch is approved.
The MYSQL_CLIENT_NO_THREADS define was renamed from
UNDEF_THREADS_HACK, to get a more suitable (less suspicious)
name for the define. (The UNDEF_THREADS_HACK is retained for
backwards compatibility, though.)
This patch is also in anticipation of WL#4958, which will
remove this problem altogether by dropping the building of
libmysqlclient.
Diffstat (limited to 'libmysql')
-rw-r--r-- | libmysql/Makefile.am | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libmysql/Makefile.am b/libmysql/Makefile.am index 21f8f372d0f..f67abfd8ac6 100644 --- a/libmysql/Makefile.am +++ b/libmysql/Makefile.am @@ -21,7 +21,7 @@ # This file is public domain and comes with NO WARRANTY of any kind target = libmysqlclient.la -target_defs = -DUNDEF_THREADS_HACK -DDONT_USE_RAID @LIB_EXTRA_CCFLAGS@ +target_defs = -DMYSQL_CLIENT_NO_THREADS -DDONT_USE_RAID @LIB_EXTRA_CCFLAGS@ LIBS = @CLIENT_LIBS@ INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \ $(openssl_includes) @ZLIB_INCLUDES@ @@ -104,7 +104,7 @@ do-lib-dist: echo "# A very minimal Makefile to compile" > $$dir/Makefile; \ echo "# the minimized libmysql library" >> $$dir/Makefile; \ echo "# This file is autogenerated from Makefile.am" >> $$dir/Makefile; \ - echo 'CFLAGS= -I. -DUNDEF_THREADS_HACK' >>$$dir/Makefile; \ + echo 'CFLAGS= -I. -DMYSQL_CLIENT_NO_THREADS' >>$$dir/Makefile; \ echo "obj=$$objs" >>$$dir/Makefile; \ echo 'all: libmysql.a' >>$$dir/Makefile; \ echo 'libmysql.a: $$(obj)' >>$$dir/Makefile; \ |