summaryrefslogtreecommitdiff
path: root/shmexport.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-10-03 10:45:29 -0400
committerEric S. Raymond <esr@thyrsus.com>2011-10-03 10:45:29 -0400
commitdb993006c341f476e80cf7f1aba59081d2947ab3 (patch)
tree0b8c0a8d324819cd810c8ef4317a91a213e45909 /shmexport.c
parentecf1b666629bd74e4b5e28ec0edd1f787c737476 (diff)
downloadgpsd-db993006c341f476e80cf7f1aba59081d2947ab3.tar.gz
First cut at implementing waiting test for shm export.
Timeout argument is presently ignored.
Diffstat (limited to 'shmexport.c')
-rw-r--r--shmexport.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/shmexport.c b/shmexport.c
index 8e2cf190..5959b581 100644
--- a/shmexport.c
+++ b/shmexport.c
@@ -22,6 +22,7 @@ PERMISSIONS
#include <sys/shm.h>
#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;