Skip to content

nsexec: fix build against musl libc#762

Merged
crosbymichael merged 1 commit intoopencontainers:masterfrom
ncopa:musl-fix-headers
Apr 19, 2016
Merged

nsexec: fix build against musl libc#762
crosbymichael merged 1 commit intoopencontainers:masterfrom
ncopa:musl-fix-headers

Conversation

@ncopa
Copy link
Copy Markdown

@ncopa ncopa commented Apr 19, 2016

Remove a wrongly added include which was added in commit 3c2e77e (Add a
compatibility header for CentOS/RHEL 6, 2016-01-29) apparently to
fix this compile error on centos 6:

In file included from
Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/nsenter/nsexec.c:20:
/usr/include/linux/netlink.h:35: error: expected specifier-qualifier-list before 'sa_family_t'

The glibc bits/sockaddr.h says that this header should never be included
directly1. Instead, sys/socket.h should be used.

The problem was correctly fixed later, in commit 394fb55 (Fix build
error on centos6, 2016-03-02) so the incorrect bits/sockaddr.h can
safely be removed.

This is needed to build musl libc.

Fixes #761

Signed-off-by: Natanael Copa natanael.copa@docker.com

Remove a wrongly added include which was added in commit 3c2e77e (Add a
compatibility header for CentOS/RHEL 6, 2016-01-29) apparently to
fix this compile error on centos 6:

> In file included from
> Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/nsenter/nsexec.c:20:
> /usr/include/linux/netlink.h:35: error: expected specifier-qualifier-list before 'sa_family_t'

The glibc bits/sockaddr.h says that this header should never be included
directly[1]. Instead, sys/socket.h should be used.

The problem was correctly fixed later, in commit 394fb55 (Fix build
error on centos6, 2016-03-02) so the incorrect bits/sockaddr.h can
safely be removed.

This is needed to build musl libc.

Fixes opencontainers#761

[1]: https://github.molgen.mpg.de/git-mirror/glibc/blob/20003c49884422da7ffbc459cdeee768a6fee07b/bits/sockaddr.h#L20

Signed-off-by: Natanael Copa <natanael.copa@docker.com>
@cyphar
Copy link
Copy Markdown
Member

cyphar commented Apr 19, 2016

LGTM.

@crosbymichael
Copy link
Copy Markdown
Member

LGTM

@crosbymichael crosbymichael merged commit 76261a4 into opencontainers:master Apr 19, 2016
@ncopa ncopa deleted the musl-fix-headers branch April 20, 2016 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

build fails with musl libc

4 participants