From d1fc3fc702cce6efca4a20f972ef1931c8392548 Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Wed, 8 May 2019 08:49:08 +0200 Subject: Add `systemd` build tag If the systemd development files are not present on the system which builds podman, then `podman events` will error on runtime creation. Beside this, a warning will be printed when compiling podman. This commit mainly exists because projects which depend on libpod would not need the podman event support and therefore do not need to rely on the systemd headers. Signed-off-by: Sascha Grunert --- libpod/events/journal_linux.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libpod/events/journal_linux.go') diff --git a/libpod/events/journal_linux.go b/libpod/events/journal_linux.go index 8ba5bc2c7..264c84f89 100644 --- a/libpod/events/journal_linux.go +++ b/libpod/events/journal_linux.go @@ -1,3 +1,5 @@ +// +build systemd + package events import ( @@ -15,6 +17,11 @@ type EventJournalD struct { options EventerOptions } +// newEventJournalD creates a new journald Eventer +func newEventJournalD(options EventerOptions) (Eventer, error) { + return EventJournalD{options}, nil +} + // Write to journald func (e EventJournalD) Write(ee Event) error { m := make(map[string]string) -- cgit v1.2.3-54-g00ecf