1 |
vapier 14/10/30 21:23:08 |
2 |
|
3 |
Added: gpsd-3.10-nmea-disabled.patch |
4 |
Log: |
5 |
Add fix from upstream for building w/nmea driver disabled #493022 by n1ghtmare. |
6 |
|
7 |
(Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key D2E96200) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 sci-geosciences/gpsd/files/gpsd-3.10-nmea-disabled.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-geosciences/gpsd/files/gpsd-3.10-nmea-disabled.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-geosciences/gpsd/files/gpsd-3.10-nmea-disabled.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: gpsd-3.10-nmea-disabled.patch |
16 |
=================================================================== |
17 |
https://bugs.gentoo.org/493022 |
18 |
|
19 |
From c31095e1562494a74d56b46fcc01541d1444cd5c Mon Sep 17 00:00:00 2001 |
20 |
From: Simon Dawson <spdawson@×××××.com> |
21 |
Date: Sun, 8 Dec 2013 10:31:25 +0000 |
22 |
Subject: [PATCH] gpsmon: fix build when nmea is false |
23 |
|
24 |
When nmea is False and ncurses support is enabled, the build fails as |
25 |
follows. |
26 |
|
27 |
gpsmon.o: In function `gpsmon_hook': |
28 |
gpsmon.c:(.text+0x974): undefined reference to `driver_nmea0183' |
29 |
collect2: error: ld returned 1 exit status |
30 |
scons: *** [gpsmon] Error 1 |
31 |
scons: building terminated because of errors. |
32 |
|
33 |
The problem appears to be a failure to protect use of the driver_nmea0183 |
34 |
variable with appropriate #ifdef guards. |
35 |
|
36 |
Signed-off-by: Simon Dawson <spdawson@×××××.com> |
37 |
Signed-off-by: Eric S. Raymond <esr@×××××××.com> |
38 |
--- |
39 |
gpsmon.c | 4 ++++ |
40 |
1 file changed, 4 insertions(+) |
41 |
|
42 |
diff --git a/gpsmon.c b/gpsmon.c |
43 |
index de1f14b..b030979 100644 |
44 |
--- a/gpsmon.c |
45 |
+++ b/gpsmon.c |
46 |
@@ -36,7 +36,9 @@ extern struct monitor_object_t garmin_mmt, garmin_bin_ser_mmt; |
47 |
extern struct monitor_object_t italk_mmt, ubx_mmt, superstar2_mmt; |
48 |
extern struct monitor_object_t fv18_mmt, gpsclock_mmt, mtk3301_mmt; |
49 |
extern struct monitor_object_t oncore_mmt, tnt_mmt, aivdm_mmt; |
50 |
+#ifdef NMEA_ENABLE |
51 |
extern const struct gps_type_t driver_nmea0183; |
52 |
+#endif /* NMEA_ENABLE */ |
53 |
|
54 |
/* These are public */ |
55 |
struct gps_device_t session; |
56 |
@@ -477,9 +479,11 @@ static void select_packet_monitor(struct gps_device_t *device) |
57 |
*/ |
58 |
if (device->packet.type != last_type) { |
59 |
const struct gps_type_t *active_type = device->device_type; |
60 |
+#ifdef NMEA_ENABLE |
61 |
if (device->packet.type == NMEA_PACKET |
62 |
&& ((device->device_type->flags & DRIVER_STICKY) != 0)) |
63 |
active_type = &driver_nmea0183; |
64 |
+#endif /* NMEA_ENABLE */ |
65 |
if (!switch_type(active_type)) |
66 |
longjmp(terminate, TERM_DRIVER_SWITCH); |
67 |
else { |
68 |
-- |
69 |
2.1.2 |