summaryrefslogtreecommitdiff
path: root/geography/garmin-utils/patches/patch-ab
blob: 604b9f487404b035cefdca68da84e80a885f4ec1 (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
33
34
35
36
37
38
39
$NetBSD: patch-ab,v 1.6 2012/12/24 21:08:43 joerg Exp $

--- lib/gps1.c.orig	2006-07-14 02:35:53.000000000 +0000
+++ lib/gps1.c
@@ -23,6 +23,7 @@
 /*
  * Define the various serial I/O types
  */
+#undef BSD
 #define BSD	0
 #define Linux	1
 
@@ -207,7 +208,7 @@ gps_read(gps_handle gps, u_char * val, i
 			switch (stat) {
 			case -1:
 				if (gps_state.debug)
-					warn(gps_state.name);
+					warn("%s", gps_state.name);
 				return -1;
 			case 0:
 				return 0;
@@ -218,7 +219,7 @@ gps_read(gps_handle gps, u_char * val, i
 						   GPS_BUF_LEN); 
 				if (gps_state.bufcnt <= 0) {
 					if (gps_state.debug)
-						warn(gps_state.name);
+						warn("%s", gps_state.name);
 					return -1;
 				}
 				if (gps_state.debug > 4) {
@@ -254,7 +255,7 @@ gps_write(gps_handle gps, const u_char *
 				buf += written;
 			} else {
 				if (gps_state.debug)
-					warn(gps_state.name);
+					warn("%s", gps_state.name);
 				return -1;
 			}
 		}