3ecd3b8405
* add patch seccomp-use-pkg-config.patch which allows us to build runC, since they assume that the seccomp.h file lives at /usr/include/seccomp.h. OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/runc?expand=0&rev=1
46 lines
1.2 KiB
Diff
46 lines
1.2 KiB
Diff
From 37d7332d4b4159cc3ca09a020319da2492b66a4e Mon Sep 17 00:00:00 2001
|
|
From: Aleksa Sarai <asarai@suse.de>
|
|
Date: Mon, 21 Mar 2016 19:01:33 +1100
|
|
Subject: [PATCH] seccomp: use pkg-config for cgo flag generation
|
|
|
|
Not all distributions package libseccomp in the same way, but pkg-config
|
|
allows the same configuration to work on different distributions. Switch
|
|
to using pkg-config to automatically figure out what the correct
|
|
commandline flags are for libseccomp.
|
|
|
|
Signed-off-by: Aleksa Sarai <asarai@suse.de>
|
|
---
|
|
seccomp.go | 2 +-
|
|
seccomp_internal.go | 2 +-
|
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/seccomp.go b/seccomp.go
|
|
index cebafdfae841..de847378d927 100644
|
|
--- a/seccomp.go
|
|
+++ b/seccomp.go
|
|
@@ -20,7 +20,7 @@ import (
|
|
|
|
// C wrapping code
|
|
|
|
-// #cgo LDFLAGS: -lseccomp
|
|
+// #cgo pkg-config: libseccomp
|
|
// #include <stdlib.h>
|
|
// #include <seccomp.h>
|
|
import "C"
|
|
diff --git a/seccomp_internal.go b/seccomp_internal.go
|
|
index 306ed17570be..04095f664879 100644
|
|
--- a/seccomp_internal.go
|
|
+++ b/seccomp_internal.go
|
|
@@ -15,7 +15,7 @@ import (
|
|
// Get the seccomp header in scope
|
|
// Need stdlib.h for free() on cstrings
|
|
|
|
-// #cgo LDFLAGS: -lseccomp
|
|
+// #cgo pkg-config: libseccomp
|
|
/*
|
|
#include <stdlib.h>
|
|
#include <seccomp.h>
|
|
--
|
|
2.7.3
|
|
|