Skip to content

Commit

Permalink
Merge pull request #1305 from gustavosbarreto/fix_multiple_definition…
Browse files Browse the repository at this point in the history
…_of_init

pkg/unshare: declare init() as static
  • Loading branch information
rhatdan committed Aug 6, 2022
2 parents 7db8254 + 89878da commit 9ba108e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/unshare/unshare_cgo.go
Expand Up @@ -5,7 +5,7 @@ package unshare

// #cgo CFLAGS: -Wall
// extern void _containers_unshare(void);
// void __attribute__((constructor)) init(void) {
// static void __attribute__((constructor)) init(void) {
// _containers_unshare();
// }
import "C"
2 changes: 1 addition & 1 deletion pkg/unshare/unshare_gccgo.go
Expand Up @@ -4,7 +4,7 @@ package unshare

// #cgo CFLAGS: -Wall -Wextra
// extern void _containers_unshare(void);
// void __attribute__((constructor)) init(void) {
// static void __attribute__((constructor)) init(void) {
// _containers_unshare();
// }
import "C"
Expand Down

0 comments on commit 9ba108e

Please sign in to comment.