From db993006c341f476e80cf7f1aba59081d2947ab3 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Mon, 3 Oct 2011 10:45:29 -0400 Subject: First cut at implementing waiting test for shm export. Timeout argument is presently ignored. --- shmexport.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'shmexport.c') diff --git a/shmexport.c b/shmexport.c index 8e2cf190..5959b581 100644 --- a/shmexport.c +++ b/shmexport.c @@ -22,6 +22,7 @@ PERMISSIONS #include #include "gpsd.h" +#include "libgps.h" /* for SHM_PSEUDO_FD */ #ifdef SHM_EXPORT_ENABLE @@ -84,9 +85,9 @@ void shm_update(struct gps_context_t *context, struct gps_data_t *gpsdata) sizeof(struct gps_data_t)); barrier(); #ifndef USE_QT - shared->gpsdata.gps_fd = -1; + shared->gpsdata.gps_fd = SHM_PSEUDO_FD; #else - shared->gpsdata.gps_fd = (void *)(intptr_t)-1; + shared->gpsdata.gps_fd = (void *)(intptr_t)SHM_PSEUDO_FD; #endif /* USE_QT */ barrier(); shared->bookend1 = tick; -- cgit v1.2.1