summaryrefslogtreecommitdiff
path: root/sysutils/gamin/patches/patch-ab
blob: 5f578365c3dfdefa19993027b6d80987dea24e6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
$NetBSD: patch-ab,v 1.1.1.1 2005/08/10 21:01:52 jlam Exp $

--- server/gam_kqueue.c.orig	2005-08-04 08:17:37.000000000 +0000
+++ server/gam_kqueue.c
@@ -52,6 +52,7 @@
 #include <string.h>
 #include <fcntl.h>
 #include <unistd.h>
+#include <sys/param.h>
 #include <sys/types.h>
 #include <sys/sysctl.h>
 #include <sys/stat.h>
@@ -327,7 +328,7 @@ gam_kqueue_get_uint_sysctl (const char *
 {
   unsigned int value_len = sizeof(*value);
 
-  if (sysctlbyname(name, value, &value_len, NULL, 0) < 0)
+  if (sysctlbyname(name, value, &value_len, (void *)NULL, 0) < 0)
     {
       gam_error(DEBUG_INFO, "unable to retrieve %s: %s\n", name, g_strerror(errno));
       return FALSE;
@@ -1031,7 +1032,7 @@ gam_kqueue_kevent_cb (GIOChannel *source
     }
 
   for (i = 0; i < nevents; i++)
-    MONITOR(ev[i].udata)->handle_kevent(ev[i].udata, &ev[i]);
+    MONITOR(ev[i].udata)->handle_kevent(MONITOR(ev[i].udata), &ev[i]);
   
   return TRUE;			/* keep source */
 }