From 2f16a30a4e3a36dd1fe175de885193a73aa99ae6 Mon Sep 17 00:00:00 2001 From: Fred Wright Date: Sat, 4 Mar 2017 13:28:29 -0800 Subject: Adds default SIGHUP/SIGQUIT defs for non-POSIX builds. This avoids some build errors on platforms like Windows. Most likely signal() and sigaction() will fail for unsupported signals, but all the GPSD code ignores any such failures, anyway. The definitions match the POSIX values, so they won't collide with other signals on any platform that uses the POSIX numbers for the supported signals. TESTED: Ran "scons build-all" on OSX. --- os_compat.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'os_compat.h') diff --git a/os_compat.h b/os_compat.h index 93ea8b06..00e56559 100644 --- a/os_compat.h +++ b/os_compat.h @@ -73,6 +73,15 @@ size_t strlcpy(char *dst, const char *src, size_t size); #endif /* !HAVE_STRLCPY */ +/* Provide missing signal numbers for non-POSIX builds */ + +#ifndef SIGHUP +#define SIGHUP 1 +#endif +#ifndef SIGQUIT +#define SIGQUIT 3 +#endif + # ifdef __cplusplus } # endif -- cgit v1.2.1