From 35e31f00782f28d904f8d8216ae0c07b85768193 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 3 Nov 2015 19:07:25 -0500 Subject: *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. --- sd_daemon/listen_fds.go | 3 ++- 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 +///*#include */ +//#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 +///*#include */ +//#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{}) { -- cgit v1.2.3-54-g00ecf