aboutsummaryrefslogtreecommitdiffstats
path: root/databases
diff options
context:
space:
mode:
authorale <ale@FreeBSD.org>2009-01-27 19:48:00 +0800
committerale <ale@FreeBSD.org>2009-01-27 19:48:00 +0800
commit77107dc4ec2945185a1f09d12a1043654690041b (patch)
tree1f4e2d86dc179fbf971d992fa66b60b87e0ebb57 /databases
parenta9a88bf62422fe21b64929168cbb5bcc398ed7d4 (diff)
downloadfreebsd-ports-gnome-77107dc4ec2945185a1f09d12a1043654690041b.tar.gz
freebsd-ports-gnome-77107dc4ec2945185a1f09d12a1043654690041b.tar.zst
freebsd-ports-gnome-77107dc4ec2945185a1f09d12a1043654690041b.zip
Fix build.
Diffstat (limited to 'databases')
-rw-r--r--databases/mysql60-server/Makefile1
-rw-r--r--databases/mysql60-server/files/patch-64045115
2 files changed, 115 insertions, 1 deletions
diff --git a/databases/mysql60-server/Makefile b/databases/mysql60-server/Makefile
index 96829f87ba7d..45fd11c21d4d 100644
--- a/databases/mysql60-server/Makefile
+++ b/databases/mysql60-server/Makefile
@@ -29,7 +29,6 @@ CONFIGURE_ARGS= --localstatedir=/var/db/mysql \
--without-readline \
--without-libedit \
--with-libwrap \
- --with-mysqlfs \
--with-low-memory \
--with-comment='FreeBSD port: ${PKGNAME}' \
--enable-thread-safe-client
diff --git a/databases/mysql60-server/files/patch-64045 b/databases/mysql60-server/files/patch-64045
new file mode 100644
index 000000000000..a59228a1a5f8
--- /dev/null
+++ b/databases/mysql60-server/files/patch-64045
@@ -0,0 +1,115 @@
+=== modified file 'include/my_pthread.h'
+--- include/my_pthread.h 2008-12-14 11:36:15 +0000
++++ include/my_pthread.h 2009-01-26 15:56:07 +0000
+@@ -621,6 +621,7 @@ extern pthread_mutexattr_t my_errorcheck
+
+ typedef ulong my_thread_id;
+
++extern my_bool my_threadattr_global_init(void);
+ extern my_bool my_thread_global_init(void);
+ extern void my_thread_global_end(void);
+ extern my_bool my_thread_init(void);
+
+=== modified file 'mysys/my_init.c'
+--- mysys/my_init.c 2009-01-16 11:49:33 +0000
++++ mysys/my_init.c 2009-01-26 15:56:07 +0000
+@@ -84,11 +84,14 @@ my_bool my_init(void)
+ if (my_progname)
+ my_progname_short= my_progname + dirname_length(my_progname);
+
+-#if defined(THREAD) && defined(SAFE_MUTEX)
++#if defined(THREAD)
++ if (my_threadattr_global_init())
++ return 1;
++# if defined(SAFE_MUTEX)
+ safe_mutex_global_init(); /* Must be called early */
+-#endif
+-#if defined(THREAD) && defined(MY_PTHREAD_FASTMUTEX) && !defined(SAFE_MUTEX)
++# elif defined(MY_PTHREAD_FASTMUTEX)
+ fastmutex_global_init(); /* Must be called early */
++# endif
+ #endif
+ netware_init();
+ #ifdef THREAD
+
+=== modified file 'mysys/my_thr_init.c'
+--- mysys/my_thr_init.c 2008-12-13 16:34:25 +0000
++++ mysys/my_thr_init.c 2009-01-26 15:56:07 +0000
+@@ -68,6 +68,47 @@ nptl_pthread_exit_hack_handler(void *arg
+ #endif /* TARGET_OS_LINUX */
+
+
++
++/*
++ initialize thread attributes
++
++ SYNOPSIS
++ my_threadattr_global_init()
++
++ RETURN is error?
++ FALSE ok
++ TRUE error
++*/
++
++my_bool my_threadattr_global_init(void)
++{
++#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
++ /*
++ Set mutex type to "fast" a.k.a "adaptive"
++
++ In this case the thread may steal the mutex from some other thread
++ that is waiting for the same mutex. This will save us some
++ context switches but may cause a thread to 'starve forever' while
++ waiting for the mutex (not likely if the code within the mutex is
++ short).
++ */
++ pthread_mutexattr_init(&my_fast_mutexattr); /* ?= MY_MUTEX_INIT_FAST */
++ pthread_mutexattr_settype(&my_fast_mutexattr,
++ PTHREAD_MUTEX_ADAPTIVE_NP);
++#endif
++#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
++ /*
++ Set mutex type to "errorcheck"
++ */
++ pthread_mutexattr_init(&my_errorcheck_mutexattr);
++ pthread_mutexattr_settype(&my_errorcheck_mutexattr,
++ PTHREAD_MUTEX_ERRORCHECK);
++#endif
++
++ return FALSE;
++}
++
++
+ static uint get_thread_lib(void);
+
+ /*
+@@ -127,28 +168,6 @@ my_bool my_thread_global_init(void)
+ if (my_thread_init())
+ return 1;
+
+-#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
+- /*
+- Set mutex type to "fast" a.k.a "adaptive"
+-
+- In this case the thread may steal the mutex from some other thread
+- that is waiting for the same mutex. This will save us some
+- context switches but may cause a thread to 'starve forever' while
+- waiting for the mutex (not likely if the code within the mutex is
+- short).
+- */
+- pthread_mutexattr_init(&my_fast_mutexattr);
+- pthread_mutexattr_settype(&my_fast_mutexattr,
+- PTHREAD_MUTEX_ADAPTIVE_NP);
+-#endif
+-#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
+- /*
+- Set mutex type to "errorcheck"
+- */
+- pthread_mutexattr_init(&my_errorcheck_mutexattr);
+- pthread_mutexattr_settype(&my_errorcheck_mutexattr,
+- PTHREAD_MUTEX_ERRORCHECK);
+-#endif
+
+ /* Mutex uses by mysys */
+ pthread_mutex_init(&THR_LOCK_open,MY_MUTEX_INIT_FAST);
+