diff options
author | Paul Barker <paul@paulbarker.me.uk> | 2016-06-16 20:06:28 +0100 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2016-06-17 08:34:55 -0400 |
commit | 6b656b8678abbda77f950ba6fd638196166333b7 (patch) | |
tree | 5d243b885abbcf619ba055b958d847b7c3e5e1ea | |
parent | 7605443085454a4c523c04b981db85ee96a1f9d5 (diff) | |
download | meta-virtualization-6b656b8678abbda77f950ba6fd638196166333b7.tar.gz |
runc: Backport fix for building against musl
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
-rw-r--r-- | recipes-containers/runc/runc/0001-nsexec-fix-build-against-musl-libc.patch | 48 | ||||
-rw-r--r-- | recipes-containers/runc/runc_git.bb | 1 |
2 files changed, 49 insertions, 0 deletions
diff --git a/recipes-containers/runc/runc/0001-nsexec-fix-build-against-musl-libc.patch b/recipes-containers/runc/runc/0001-nsexec-fix-build-against-musl-libc.patch new file mode 100644 index 00000000..aa57636f --- /dev/null +++ b/recipes-containers/runc/runc/0001-nsexec-fix-build-against-musl-libc.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | From ac6bd953192fa6752a07be7501f69f7cffe33e8e Mon Sep 17 00:00:00 2001 | ||
2 | From: Natanael Copa <natanael.copa@docker.com> | ||
3 | Date: Tue, 19 Apr 2016 10:43:00 +0200 | ||
4 | Subject: [PATCH] nsexec: fix build against musl libc | ||
5 | |||
6 | Remove a wrongly added include which was added in commit 3c2e77ee (Add a | ||
7 | compatibility header for CentOS/RHEL 6, 2016-01-29) apparently to | ||
8 | fix this compile error on centos 6: | ||
9 | |||
10 | > In file included from | ||
11 | > Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/nsenter/nsexec.c:20: | ||
12 | > /usr/include/linux/netlink.h:35: error: expected specifier-qualifier-list before 'sa_family_t' | ||
13 | |||
14 | The glibc bits/sockaddr.h says that this header should never be included | ||
15 | directly[1]. Instead, sys/socket.h should be used. | ||
16 | |||
17 | The problem was correctly fixed later, in commit 394fb55 (Fix build | ||
18 | error on centos6, 2016-03-02) so the incorrect bits/sockaddr.h can | ||
19 | safely be removed. | ||
20 | |||
21 | This is needed to build musl libc. | ||
22 | |||
23 | Fixes #761 | ||
24 | |||
25 | [1]: https://github.molgen.mpg.de/git-mirror/glibc/blob/20003c49884422da7ffbc459cdeee768a6fee07b/bits/sockaddr.h#L20 | ||
26 | |||
27 | Signed-off-by: Natanael Copa <natanael.copa@docker.com> | ||
28 | Signed-off-by: Paul Barker <paul@paulbarker.me.uk> | ||
29 | Upstream-status: Backport | ||
30 | --- | ||
31 | libcontainer/nsenter/nsexec.c | 1 - | ||
32 | 1 file changed, 1 deletion(-) | ||
33 | |||
34 | diff --git a/libcontainer/nsenter/nsexec.c b/libcontainer/nsenter/nsexec.c | ||
35 | index 8f37d6c..40a8f89 100644 | ||
36 | --- a/libcontainer/nsenter/nsexec.c | ||
37 | +++ b/libcontainer/nsenter/nsexec.c | ||
38 | @@ -18,7 +18,6 @@ | ||
39 | #include <unistd.h> | ||
40 | #include <grp.h> | ||
41 | |||
42 | -#include <bits/sockaddr.h> | ||
43 | #include <linux/types.h> | ||
44 | |||
45 | // All arguments should be above the stack because it grows down | ||
46 | -- | ||
47 | 2.1.4 | ||
48 | |||
diff --git a/recipes-containers/runc/runc_git.bb b/recipes-containers/runc/runc_git.bb index 30a46403..b47914eb 100644 --- a/recipes-containers/runc/runc_git.bb +++ b/recipes-containers/runc/runc_git.bb | |||
@@ -7,6 +7,7 @@ DESCRIPTION = "runc is a CLI tool for spawning and running containers according | |||
7 | SRCREV = "baf6536d6259209c3edfa2b22237af82942d3dfa" | 7 | SRCREV = "baf6536d6259209c3edfa2b22237af82942d3dfa" |
8 | SRC_URI = "\ | 8 | SRC_URI = "\ |
9 | git://github.com/opencontainers/runc;branch=master \ | 9 | git://github.com/opencontainers/runc;branch=master \ |
10 | file://0001-nsexec-fix-build-against-musl-libc.patch \ | ||
10 | " | 11 | " |
11 | 12 | ||
12 | # Apache-2.0 for containerd | 13 | # Apache-2.0 for containerd |