summaryrefslogtreecommitdiff
path: root/socket.go
diff options
context:
space:
mode:
authorGrégoire Duchêne <gduchene@awhk.org>2021-07-04 15:48:31 +0100
committerGrégoire Duchêne <gduchene@awhk.org>2021-07-04 15:48:31 +0100
commit12482405856b9932efa2f91330fb7a8a2e4aa2d9 (patch)
tree9d97ce79a32721fabc84a99b3474d1926c8ee21f /socket.go
parent466216e4496ab3346a50353b522af141a37b6a32 (diff)
Return ErrNoSDSupport if using dummy codev0.2.0
Diffstat (limited to 'socket.go')
-rw-r--r--socket.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/socket.go b/socket.go
index d982812..6603cdc 100644
--- a/socket.go
+++ b/socket.go
@@ -14,7 +14,16 @@
// is the documentation for the C API.
package gosdd
-import "os"
+import (
+ "errors"
+ "os"
+)
+
+// ErrNoSDSupport is a generic error that is returned when gosdd has no
+// systemd support, either because the library is compiled on a system
+// that is not Linux or because it was explicitly disabled with the
+// ‘nosystemd’ build tag.
+var ErrNoSDSupport = errors.New("no systemd support")
// SDListenFDs is a wrapper around sd_listen_fds.
func SDListenFDs(unsetenv bool) ([]*os.File, error) {