summaryrefslogtreecommitdiff
path: root/ntpshm.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-03-29 11:01:41 -0400
committerEric S. Raymond <esr@thyrsus.com>2011-03-29 11:01:41 -0400
commit173c43dbc016bc44bc62a852526a87b78817d636 (patch)
treeafddc6678b5ab6f75b8f44cefeaaa163ad9972f1 /ntpshm.c
parent7e753e02514e46ae59f4e532c854b764b876ce0a (diff)
downloadgpsd-173c43dbc016bc44bc62a852526a87b78817d636.tar.gz
Squeeze more code out of the minimal build.
Diffstat (limited to 'ntpshm.c')
-rw-r--r--ntpshm.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/ntpshm.c b/ntpshm.c
index f51d8f62..50b7180a 100644
--- a/ntpshm.c
+++ b/ntpshm.c
@@ -874,18 +874,15 @@ static /*@null@*/ void *gpsd_ppsmonitor(void *arg)
}
/*@+mustfreefresh +type +unrecog@*/
#endif /* PPS_ENABLE */
-#endif /* NTPSHM_ENABLE */
void ntpd_link_deactivate(struct gps_device_t *session)
{
-#ifdef NTPSHM_ENABLE
(void)ntpshm_free(session->context, session->shmindex);
session->shmindex = -1;
# ifdef PPS_ENABLE
(void)ntpshm_free(session->context, session->shmTimeP);
session->shmTimeP = -1;
# endif /* PPS_ENABLE */
-#endif /* NTPSHM_ENABLE */
}
void ntpd_link_activate(struct gps_device_t *session)
@@ -894,7 +891,6 @@ void ntpd_link_activate(struct gps_device_t *session)
pthread_t pt;
#endif /* defined(PPS_ENABLE) && defined(TIOCMIWAIT) */
-#ifdef NTPSHM_ENABLE
/* If we are talking to ntpd, allocate a shared-memory segment for "NMEA" time data */
if (session->context->enable_ntpshm)
session->shmindex = ntpshm_alloc(session->context);
@@ -917,5 +913,6 @@ void ntpd_link_activate(struct gps_device_t *session)
#endif /* defined(PPS_ENABLE) && defined(TIOCMIWAIT) */
}
-#endif /* NTPSHM_ENABLE */
}
+
+#endif /* NTPSHM_ENABLE */