pkgsrc/databases/mysql57-client/patches/patch-mysys_kqueue__timers.c
adam 7cb1f0a9d9 MySQL is a SQL (Structured Query Language) database server. SQL is the most
popular database language in the world. MySQL is a client-server implementation
that consists of a server daemon `mysqld' and many different client
programs/libraries.

The main goals of MySQL are speed and robustness.

The base upon which MySQL is built is a set of routines that have been used in
a highly demanding production environment for many years.  While MySQL is still
in development it already offers a rich and highly useful function set.
2016-09-16 06:49:11 +00:00

37 lines
927 B
C

$NetBSD: patch-mysys_kqueue__timers.c,v 1.1 2016/09/16 06:49:11 adam Exp $
Fix for systems which do not define EVFILT_USER.
--- mysys/kqueue_timers.c.orig 2016-09-15 11:33:26.000000000 +0000
+++ mysys/kqueue_timers.c
@@ -67,8 +67,10 @@ timer_notify_thread_func(void *arg MY_AT
DBUG_ASSERT(timer->id == kev.ident);
timer->notify_function(timer);
}
+#ifdef EVFILT_USER
else if (kev.filter == EVFILT_USER)
break;
+#endif
}
close(kq_fd);
@@ -89,7 +91,9 @@ start_helper_thread(void)
{
struct kevent kev;
+#ifdef EVFILT_USER
EV_SET(&kev, 0, EVFILT_USER, EV_ADD, 0, 0, 0);
+#endif
if (kevent(kq_fd, &kev, 1, NULL, 0, NULL) < 0)
{
@@ -143,7 +147,9 @@ my_timer_deinitialize(void)
{
struct kevent kev;
+#ifdef EVFILT_USER
EV_SET(&kev, 0, EVFILT_USER, 0, NOTE_TRIGGER, 0, 0);
+#endif
if (kevent(kq_fd, &kev, 1, NULL, 0, NULL) < 0)
my_message_local(ERROR_LEVEL,