Skip to content

build fails with musl libc #761

@ncopa

Description

@ncopa

When building with musl libc build fails with this error:

go build -ldflags "-X main.gitCommit=9384f484ff795fb049f1dd2dc977536baae472c3" -tags "seccomp" -o runc .
# github.com/opencontainers/runc/libcontainer/nsenter
Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/nsenter/nsexec.c:21:27: fatal error: bits/sockaddr.h: No such file or directory
compilation terminated.
Makefile:16: recipe for target 'all' failed
make: *** [all] Error 2

According the glibc source, the bits/sockaddr.h header should never be included directly, instead sys/socket.h should be used instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions