summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gpsd.h-tail4
-rw-r--r--gpsdctl.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/gpsd.h-tail b/gpsd.h-tail
index f39032b2..8a432499 100644
--- a/gpsd.h-tail
+++ b/gpsd.h-tail
@@ -27,6 +27,10 @@ typedef unsigned int speed_t;
#define JSON_DATE_MAX 24 /* ISO8601 timestamp with 2 decimal places */
+#ifndef DEFAULT_GPSD_SOCKET
+#define DEFAULT_GPSD_SOCKET "/var/run/gpsd.sock"
+#endif
+
/* Some internal capabilities depend on which drivers we're compiling. */
#if !defined(NMEA_ENABLE) && (defined(FV18_ENABLE) || defined(MTK3301_ENABLE) || defined(TNT_ENABLE) || defined(OCEANSERVER_ENABLE) || defined(GPSCLOCK_ENABLE))
#define NMEA_ENABLE
diff --git a/gpsdctl.c b/gpsdctl.c
index b34b31a4..a69aafae 100644
--- a/gpsdctl.c
+++ b/gpsdctl.c
@@ -20,7 +20,7 @@
#include "gpsd.h"
-static char *control_socket = "/var/run/gpsd.sock";
+static char *control_socket = DEFAULT_GPSD_SOCKET;
static char *gpsd_options = "";
static int gpsd_control(char *action, char *argument)