diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-03-29 12:45:01 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-03-29 12:45:01 -0400 |
commit | 3a4998820eba6b6ebe072e2a85e68cdb878d6fa2 (patch) | |
tree | 9a27beeec2406ac858fa1cc15325c26ad9111df6 /gpsd.c | |
parent | fca283a87a6a9d8c8e0f6341e1e16d026f1196c5 (diff) | |
download | gpsd-3a4998820eba6b6ebe072e2a85e68cdb878d6fa2.tar.gz |
Eliminate nowait global when FORCE_NOWAIT.
Diffstat (limited to 'gpsd.c')
-rw-r--r-- | gpsd.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -139,7 +139,9 @@ static int maxfd; static int debuglevel; static bool in_background = false; static bool listen_global = false; +#ifndef FORCE_NOWAIT static bool nowait = false; +#endif /* FORCE_NOWAIT */ static jmp_buf restartbuf; static struct gps_context_t context; @@ -1791,10 +1793,6 @@ int main(int argc, char *argv[]) } } -#ifdef FORCE_NOWAIT - nowait = true; -#endif /* FORCE_NOWAIT */ - #ifdef CONTROL_SOCKET_ENABLE if (!control_socket && optind >= argc) { gpsd_report(LOG_ERROR, @@ -1876,7 +1874,11 @@ int main(int argc, char *argv[]) if (nice(NICEVAL) == -1 && errno != 0) gpsd_report(LOG_INF, "NTPD Priority setting failed.\n"); } +#ifdef FORCE_NOWAIT + (void)ntpshm_init(&context, true); +#else (void)ntpshm_init(&context, nowait); +#endif /* FORCE_NOWAIT */ #endif /* NTPSHM_ENABLE */ #ifdef DBUS_EXPORT_ENABLE |