The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / gpsd / 0003-Complete-wrapping-of-ntpshm_latch-function-in-ifdef-.patch
1 From 519314d488624885a73f6204e3113aab850a36a0 Mon Sep 17 00:00:00 2001
2 From: Simon Dawson <spdawson@gmail.com>
3 Date: Wed, 3 Sep 2014 18:39:22 +0100
4 Subject: [PATCH] Complete wrapping of ntpshm_latch function in #ifdef
5  NTPSHM_ENABLE
6 To: gpsd-dev@nongnu.org
7
8 Currently, the build fails as follows
9
10 gpsmon.o: In function `gpsmon_hook':
11 gpsmon.c:(.text+0x8b0): undefined reference to `ntpshm_latch'
12 collect2: error: ld returned 1 exit status
13 scons: *** [gpsmon] Error 1
14
15 Signed-off-by: Simon Dawson <spdawson@gmail.com>
16 ---
17 diff -Nurp a/gpsd.h-tail b/gpsd.h-tail
18 --- a/gpsd.h-tail       2014-08-22 21:35:56.000000000 +0100
19 +++ b/gpsd.h-tail       2014-09-03 18:52:04.048627518 +0100
20 @@ -842,7 +842,9 @@ extern unsigned int ais_binary_encode(st
21  extern void ntpshm_context_init(struct gps_context_t *);
22  extern void ntpshm_session_init(struct gps_device_t *);
23  extern int ntpshm_put(struct gps_device_t *, int, struct timedrift_t *);
24 +#ifdef NTPSHM_ENABLE
25  extern void ntpshm_latch(struct gps_device_t *device,  /*@out@*/struct timedrift_t *td);
26 +#endif /* NTPSHM_ENABLE */
27  extern void ntpshm_link_deactivate(struct gps_device_t *);
28  extern void ntpshm_link_activate(struct gps_device_t *);
29  
30 diff -Nurp a/gpsmon.c b/gpsmon.c
31 --- a/gpsmon.c  2014-08-22 21:06:58.000000000 +0100
32 +++ b/gpsmon.c  2014-09-03 18:52:23.172628059 +0100
33 @@ -778,8 +778,10 @@ static void gpsmon_hook(struct gps_devic
34  
35      report_unlock();
36  
37 +#ifdef NTPSHM_ENABLE
38      /* Update the last fix time seen for PPS. FIXME: do this here? */
39      ntpshm_latch(device, &td);
40 +#endif /* NTPSHM_ENABLE */
41  }
42  /*@+observertrans +nullpass +globstate +compdef +uniondef@*/
43