summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Norris <rw_norris@hotmail.com>2016-07-30 18:08:50 +0000
committerGary E. Miller <gem@rellim.com>2016-08-02 16:58:47 -0700
commitf8dc3645fd38767497055fba981b0f5c8c1f9661 (patch)
tree824bffe500d7a6f3c4b18bd73c8016cab0ceb1a2
parent5115c0b90e5d5a2cb2cb45761d0ae535e5b0be52 (diff)
downloadgpsd-f8dc3645fd38767497055fba981b0f5c8c1f9661.tar.gz
Ensure all functions of the client API are available at all times.
Thus client programs won't fail to build or run due to missing functions. Although when clientdebug is turned off in building libgps, then these functions won't do anything. Signed-off-by: Gary E. Miller <gem@rellim.com>
-rw-r--r--libgps_core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libgps_core.c b/libgps_core.c
index 582e2105..ca580bd1 100644
--- a/libgps_core.c
+++ b/libgps_core.c
@@ -49,6 +49,10 @@ void libgps_trace(int errlevel, const char *fmt, ...)
(void)fputs(buf, debugfp);
}
}
+#else
+// Functions defined as so to furfil the API but otherwise do nothing when built with debug capability turned off
+void gps_enable_debug(int level UNUSED, FILE * fp UNUSED) {}
+void libgps_trace(int errlevel UNUSED, const char *fmt UNUSED, ...){}
#endif /* LIBGPS_DEBUG */
#ifdef SOCKET_EXPORT_ENABLE