The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/go-lxc/pull/133

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
Use the same flags we require in LXD. Especially, hide all C functions
to avoid symbol resolution clashes.

Signed-off-by: Christian Brauner <christian.brau...@ubuntu.com>
From 498d25b1407b2c60c44dcd70d8798a6673861afe Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brau...@ubuntu.com>
Date: Mon, 21 Oct 2019 21:27:02 +0200
Subject: [PATCH] go-lxc: update cgo build flags

Use the same flags we require in LXD. Especially, hide all C functions
to avoid symbol resolution clashes.

Signed-off-by: Christian Brauner <christian.brau...@ubuntu.com>
---
 linking_dynamic.go | 1 +
 linking_static.go  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/linking_dynamic.go b/linking_dynamic.go
index fdd8bbc..4d67019 100644
--- a/linking_dynamic.go
+++ b/linking_dynamic.go
@@ -6,5 +6,6 @@
 
 package lxc
 
+// #cgo CFLAGS: -std=gnu11 -Wvla -Werror -fvisibility=hidden
 // #cgo pkg-config: lxc
 import "C"
diff --git a/linking_static.go b/linking_static.go
index 8e9c626..3bacea2 100644
--- a/linking_static.go
+++ b/linking_static.go
@@ -6,6 +6,7 @@
 
 package lxc
 
+// #cgo CFLAGS: -std=gnu11 -Wvla -Werror -fvisibility=hidden
 // #cgo pkg-config: --static lxc
 // #cgo LDFLAGS: -static
 import "C"
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to