From e8d8c8bc9ea7a5d4aa87831835d0228743ea964a Mon Sep 17 00:00:00 2001 From: Robert Norris Date: Sun, 5 Mar 2017 18:43:40 +0000 Subject: Enable Windows version of gpspipe Use recv() rather than read() for Windows compatibility. Disable serial port code not available on Windows. Add open flag that's not available on Windows. TESTED: Built gpspipe for Windows under cross compiler. Run gpspipe on a Windows system and successfully connects to an instance of gpsd and dumps NMEA output to the terminal or a specified output file. Still builds and runs on a Linux system including the daemon option. Signed-off-by: Fred Wright --- os_compat.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'os_compat.h') diff --git a/os_compat.h b/os_compat.h index 9321809f..2b4189f0 100644 --- a/os_compat.h +++ b/os_compat.h @@ -114,6 +114,12 @@ size_t strlcpy(char *dst, const char *src, size_t size); #define SIGQUIT 3 #endif +/* Provide missing open flags for non-POSIX builds */ + +#ifndef O_NOCTTY +#define O_NOCTTY 0400 +#endif + # ifdef __cplusplus } # endif -- cgit v1.2.1