summaryrefslogtreecommitdiff
path: root/misc/heyu/patches/patch-ad
blob: c18b07246020734f7cba5ca13dfd57fd3959c8b8 (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
31
$NetBSD: patch-ad,v 1.3 2003/11/11 10:17:39 wiz Exp $

--- xread.c.orig	Tue Mar 18 00:23:30 2003
+++ xread.c
@@ -24,7 +24,7 @@
 #include <stdio.h>
 #include <signal.h>
 #include <setjmp.h>
-#if	(defined(SCO) || defined (SOLARIS))
+#if	(defined(SCO) || defined (SOLARIS) || defined(NETBSD))
 #include <errno.h>
 #else
 #include <sys/errno.h>
@@ -32,7 +32,7 @@
 #include <syslog.h>
 #include <unistd.h>
 #include "x10.h"
-#if (defined(LINUX) || defined(SOLARIS) || defined(FREEBSD))
+#if (defined(LINUX) || defined(SOLARIS) || defined(FREEBSD) || defined(NETBSD))
 #include <string.h>    /* char *strerror(); */
 #endif
  
@@ -130,7 +130,7 @@ unsigned char *buf;
 	       if( (i < 0) && (i_am_relay == 1) )
 	       {
 	           syslog(LOG_ERR,"Relay Xread read error");
-	           syslog(LOG_ERR, strerror(errno));
+	           syslog(LOG_ERR, "%s", strerror(errno));
 	       }
 	    (void) alarm(0);
 	    (void) signal(SIGALRM, SIG_IGN);