diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-07-24 14:32:02 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-07-24 14:32:35 +0200 |
commit | 3ad3e83c7aea762c7030b7aa7485f48083d7d9a9 (patch) | |
tree | 7525726409e802e7c4278d1b4813adba8b66b008 | |
parent | 2e13b7b0fb1a6076c729acfc7055a96ae53f0a12 (diff) |
uapi: allow overriding socket directory at compile time
-rw-r--r-- | uapi_bsd.go | 3 | ||||
-rw-r--r-- | uapi_linux.go | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/uapi_bsd.go b/uapi_bsd.go index bb16d2c..80435dd 100644 --- a/uapi_bsd.go +++ b/uapi_bsd.go @@ -18,12 +18,13 @@ import ( "unsafe" ) +var socketDirectory = "/var/run/wireguard" + const ( ipcErrorIO = -int64(unix.EIO) ipcErrorProtocol = -int64(unix.EPROTO) ipcErrorInvalid = -int64(unix.EINVAL) ipcErrorPortInUse = -int64(unix.EADDRINUSE) - socketDirectory = "/var/run/wireguard" socketName = "%s.sock" ) diff --git a/uapi_linux.go b/uapi_linux.go index 0cb2924..7e6e7f8 100644 --- a/uapi_linux.go +++ b/uapi_linux.go @@ -16,12 +16,13 @@ import ( "path" ) +var socketDirectory = "/var/run/wireguard" + const ( ipcErrorIO = -int64(unix.EIO) ipcErrorProtocol = -int64(unix.EPROTO) ipcErrorInvalid = -int64(unix.EINVAL) ipcErrorPortInUse = -int64(unix.EADDRINUSE) - socketDirectory = "/var/run/wireguard" socketName = "%s.sock" ) |