Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-geosciences/gpsd/files: gpsd-3.11-no-ntpshm.patch
Date: Thu, 30 Oct 2014 21:32:43
Message-Id: 20141030213238.C05EA9191@oystercatcher.gentoo.org
1 vapier 14/10/30 21:32:38
2
3 Added: gpsd-3.11-no-ntpshm.patch
4 Log:
5 Version bump.
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.11-no-ntpshm.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-geosciences/gpsd/files/gpsd-3.11-no-ntpshm.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-geosciences/gpsd/files/gpsd-3.11-no-ntpshm.patch?rev=1.1&content-type=text/plain
14
15 Index: gpsd-3.11-no-ntpshm.patch
16 ===================================================================
17 From 80cd103396fcd1185a476761bfb267ce12f64b32 Mon Sep 17 00:00:00 2001
18 From: Simon Dawson <spdawson@×××××.com>
19 Date: Mon, 25 Aug 2014 10:31:18 +0100
20 Subject: [PATCH] Fix build error when ntpshm is false
21
22 The build fails as follows
23
24 libgpsd_core.c: In function 'ntpshm_latch':
25 libgpsd_core.c:1660:24: error: 'const struct gps_type_t' has no member named 'time_offset'
26 || device->device_type->time_offset == NULL)
27 ^
28 libgpsd_core.c:1663:33: error: 'const struct gps_type_t' has no member named 'time_offset'
29 fix_time += device->device_type->time_offset(device);
30 ^
31 scons: *** [libgpsd_core.os] Error 1
32
33 The solution is to wrap #ifdef NTPSHM_ENABLE around the ntpshm_latch function
34
35 Signed-off-by: Simon Dawson <spdawson@×××××.com>
36 ---
37 libgpsd_core.c | 2 ++
38 1 file changed, 2 insertions(+)
39
40 diff --git a/libgpsd_core.c b/libgpsd_core.c
41 index 6ec08a4..f7e8075 100644
42 --- a/libgpsd_core.c
43 +++ b/libgpsd_core.c
44 @@ -1638,6 +1638,7 @@ void gpsd_zero_satellites( /*@out@*/ struct gps_data_t *out)
45 #endif
46 }
47
48 +#ifdef NTPSHM_ENABLE
49 void ntpshm_latch(struct gps_device_t *device, struct timedrift_t /*@out@*/*td)
50 /* latch the fact that we've saved a fix */
51 {
52 @@ -1668,5 +1669,6 @@ void ntpshm_latch(struct gps_device_t *device, struct timedrift_t /*@out@*/*td)
53 device->last_fixtime.clock = td->clock.tv_sec + td->clock.tv_nsec / 1e9;
54 #endif /* S_SPLINT_S */
55 }
56 +#endif /* NTPSHM_ENABLE */
57
58 /* end */
59 --
60 2.1.2
61
62 From 48caee55069bdb7f7115e1930ace3914f4ddfe3b Mon Sep 17 00:00:00 2001
63 From: Simon Dawson <spdawson@×××××.com>
64 Date: Wed, 3 Sep 2014 18:43:31 +0100
65 Subject: [PATCH] Complete wrapping of ntpshm_latch function in #ifdef
66 NTPSHM_ENABLE
67
68 Currently, the build fails as follows
69
70 gpsmon.o: In function `gpsmon_hook':
71 gpsmon.c:(.text+0x8b0): undefined reference to `ntpshm_latch'
72 collect2: error: ld returned 1 exit status
73 scons: *** [gpsmon] Error 1
74
75 Addresses Sacannah bug #43129: ntpshm patch is incomplete.
76
77 Signed-off-by: Simon Dawson <spdawson@×××××.com>
78 ---
79 gpsd.h-tail | 2 ++
80 gpsmon.c | 2 ++
81 2 files changed, 4 insertions(+)
82
83 diff --git a/gpsd.h-tail b/gpsd.h-tail
84 index 7b62ce1..7b44f91 100644
85 --- a/gpsd.h-tail
86 +++ b/gpsd.h-tail
87 @@ -857,7 +857,9 @@ extern unsigned int ais_binary_encode(struct ais_t *ais, /*@out@*/unsigned char
88 extern void ntpshm_context_init(struct gps_context_t *);
89 extern void ntpshm_session_init(struct gps_device_t *);
90 extern int ntpshm_put(struct gps_device_t *, int, struct timedrift_t *);
91 +#ifdef NTPSHM_ENABLE
92 extern void ntpshm_latch(struct gps_device_t *device, /*@out@*/struct timedrift_t *td);
93 +#endif /* NTPSHM_ENABLE */
94 extern void ntpshm_link_deactivate(struct gps_device_t *);
95 extern void ntpshm_link_activate(struct gps_device_t *);
96
97 diff --git a/gpsmon.c b/gpsmon.c
98 index c812063..909f271 100644
99 --- a/gpsmon.c
100 +++ b/gpsmon.c
101 @@ -734,8 +734,10 @@ static void gpsmon_hook(struct gps_device_t *device, gps_mask_t changed UNUSED)
102
103 report_unlock();
104
105 +#ifdef NTPSHM_ENABLE
106 /* Update the last fix time seen for PPS. FIXME: do this here? */
107 ntpshm_latch(device, &td);
108 +#endif /* NTPSHM_ENABLE */
109 }
110 /*@+observertrans +nullpass +globstate +compdef +uniondef@*/
111
112 --
113 2.1.2