summaryrefslogtreecommitdiff
path: root/x11/xlockmore/patches/patch-ab
blob: 10d755dc522b702b67595b198da601f281626daf (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
32
$NetBSD: patch-ab,v 1.8 2000/08/16 16:39:18 tron Exp $

--- xlock/xlock.c.orig	Mon Jul 10 17:46:19 2000
+++ xlock/xlock.c	Wed Aug 16 18:38:01 2000
@@ -597,7 +597,9 @@
 #include <X11/extensions/dpms.h>
 #else /* XFree86 < 4.x */
 #include <X11/extensions/dpms.h>
+#ifndef __NetBSD__
 extern unsigned char DPMSQueryExtension(Display *, int *, int *);
+#endif
 extern int  DPMSGetTimeouts(Display *, unsigned short *, unsigned short *, unsigned short *);
 extern int  DPMSSetTimeouts(Display *, unsigned short, unsigned short, unsigned short);
 #endif
@@ -953,7 +955,7 @@
 #if defined( HAVE_SYSLOG_H ) && defined( USE_SYSLOG )
 	extern Display *dsp;
 
-	syslog(SYSLOG_WARNING, buf);
+	syslog(SYSLOG_WARNING, "%s", buf);
 	if (!nolock) {
 		if (strstr(buf, "unable to open display") == NULL)
 			syslogStop(XDisplayString(dsp));
@@ -962,7 +964,7 @@
 		closelog();
 	}
 #else
-	(void) fprintf(stderr, buf);
+	(void) fprintf(stderr, "%s", buf);
 #endif
 	exit(1);
 }