freebsd-ports/devel/pinba_engine/files/patch-src__ha_pinba.cc
Michael Scheidell 36c3ff1c5f - Update to new git revision & FIX: build with MYSQL >= 51
- Note to cluster/tinderbox builders:  the 'filesystem touched' seems to be a tinderbox error. This looks like it builds ok.
- Tried on FreeBSD 7.4 and 8.2, i386, mysql 5.1 and mysql 5.5

PR:		ports/160233
Approved by:	gabor(mentor)
2012-01-06 19:44:58 +00:00

38 lines
1.1 KiB
C++

--- ./src/ha_pinba.cc.orig 2011-07-26 18:52:53.000000000 +0400
+++ ./src/ha_pinba.cc 2011-08-27 18:58:00.000000000 +0400
@@ -45,6 +45,10 @@
#include "ha_pinba.h"
+#ifdef PINBA_ENGINE_HAVE_PTHREAD_SETAFFINITY_NP
+#include <pthread_np.h>
+#endif
+
#ifdef PINBA_ENGINE_MYSQL_VERSION_5_5
# define pinba_free(a, b) my_free(a)
#else
@@ -427,13 +431,13 @@
unsigned long mask;
mask = 1;
- pthread_setaffinity_np(collector_thread, sizeof(mask), (cpu_set_t *)&mask);
+ pthread_setaffinity_np(collector_thread, sizeof(mask), (cpuset_t *)&mask);
mask = 2;
- pthread_setaffinity_np(data_thread, sizeof(mask), (cpu_set_t *)&mask);
+ pthread_setaffinity_np(data_thread, sizeof(mask), (cpuset_t *)&mask);
mask = 4;
- pthread_setaffinity_np(stats_thread, sizeof(mask), (cpu_set_t *)&mask);
+ pthread_setaffinity_np(stats_thread, sizeof(mask), (cpuset_t *)&mask);
#endif
}
@@ -452,6 +456,7 @@
int error = 0;
DBUG_ENTER("pinba_engine_shutdown");
+ pthread_detach(collector_thread);
pthread_cancel(collector_thread);
pthread_join(collector_thread, NULL);