diff options
author | Luke Shumaker <shumakl@purdue.edu> | 2015-11-03 19:07:25 -0500 |
---|---|---|
committer | Luke Shumaker <shumakl@purdue.edu> | 2015-11-03 19:07:25 -0500 |
commit | 35e31f00782f28d904f8d8216ae0c07b85768193 (patch) | |
tree | ba1af625a2ef1e69356f627223ad80cbda0a6ede | |
parent | 1409e4587ad950a4694cb00621afac397088f8fa (diff) |
*sigh* avoid reliance on systemd headers.
What I'd really like to do is have `go generate` download the headers if
they aren't on the system. But, that will have to be a later commit.
-rw-r--r-- | sd_daemon/listen_fds.go | 3 | ||||
-rw-r--r-- | sd_daemon/logger/logger.go | 10 |
2 files changed, 11 insertions, 2 deletions
diff --git a/sd_daemon/listen_fds.go b/sd_daemon/listen_fds.go index fbd2247..0ddf0d0 100644 --- a/sd_daemon/listen_fds.go +++ b/sd_daemon/listen_fds.go @@ -21,7 +21,8 @@ import ( "syscall" ) -//#include <systemd/sd-daemon.h> +///*#include <systemd/sd-daemon.h>*/ +//#define SD_LISTEN_FDS_START 3 import "C" // Returns a list of file descriptors passed in by the service manager diff --git a/sd_daemon/logger/logger.go b/sd_daemon/logger/logger.go index c15475a..005b193 100644 --- a/sd_daemon/logger/logger.go +++ b/sd_daemon/logger/logger.go @@ -21,7 +21,15 @@ import ( "os" ) -//#include <systemd/sd-daemon.h> +///*#include <systemd/sd-daemon.h>*/ +//#define SD_EMERG "<0>" +//#define SD_ALERT "<1>" +//#define SD_CRIT "<2>" +//#define SD_ERR "<3>" +//#define SD_WARNING "<4>" +//#define SD_NOTICE "<5>" +//#define SD_INFO "<6>" +//#define SD_DEBUG "<7>" import "C" func log(level string, format string, a ...interface{}) { |