diff options
author | Florian Smeets <flo@FreeBSD.org> | 2013-10-09 21:41:32 +0000 |
---|---|---|
committer | Florian Smeets <flo@FreeBSD.org> | 2013-10-09 21:41:32 +0000 |
commit | 08e550a48b353262a8685b7dcc352f9798bc0414 (patch) | |
tree | 0a292a58364a96cc513dd41b6258fa1d59fa73b8 /databases/percona56-client/files/patch-mysys__posix_timers.c | |
parent | - Respect CC (right way) [1] (diff) |
- update to 5.6.13-rel61.0
- merge r329781 to fix build with clang on i386
Diffstat (limited to 'databases/percona56-client/files/patch-mysys__posix_timers.c')
-rw-r--r-- | databases/percona56-client/files/patch-mysys__posix_timers.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/databases/percona56-client/files/patch-mysys__posix_timers.c b/databases/percona56-client/files/patch-mysys__posix_timers.c new file mode 100644 index 000000000000..52000de41a35 --- /dev/null +++ b/databases/percona56-client/files/patch-mysys__posix_timers.c @@ -0,0 +1,32 @@ +--- mysys/posix_timers.c.orig 2013-10-07 12:25:25.000000000 +0200 ++++ mysys/posix_timers.c 2013-10-07 21:04:37.090622581 +0200 +@@ -22,6 +22,10 @@ + #define sigev_notify_thread_id _sigev_un._tid + #endif + ++#ifdef __FreeBSD__ ++typedef union sigval sigval_t; ++#endif /* __FreeBSD__ */ ++ + #define MY_TIMER_EVENT_SIGNO (SIGRTMIN) + #define MY_TIMER_KILL_SIGNO (SIGRTMIN+1) + +@@ -68,7 +72,18 @@ + sigaddset(&set, MY_TIMER_KILL_SIGNO); + + /* Get the thread ID of the current thread. */ ++ ++#ifdef __FreeBSD__ ++# if __FreeBSD__version > 900030 ++ thread_id= pthread_getthreadid_np(); ++# else ++ long tid; ++ syscall(SYS_thr_self, &tid); ++ thread_id= (pid_t) tid; ++# endif ++#else + thread_id= (pid_t) syscall(SYS_gettid); ++#endif + + /* Wake up parent thread, thread_id is available. */ + pthread_barrier_wait(barrier); |