Skip to content

Instantly share code, notes, and snippets.

@mrunalp
Created August 17, 2016 18:50
Show Gist options
  • Save mrunalp/74a694b2bac513862031b466e0a5bd73 to your computer and use it in GitHub Desktop.
Save mrunalp/74a694b2bac513862031b466e0a5bd73 to your computer and use it in GitHub Desktop.
diff --git a/Makefile b/Makefile
index a84c539..16b0ec1 100644
--- a/Makefile
+++ b/Makefile
@@ -25,7 +25,7 @@ MAN_INSTALL_PATH := ${PREFIX}/share/man/man8/
VERSION := ${shell cat ./VERSION}
all: $(RUNC_LINK)
- go build -i -ldflags "-X main.gitCommit=${COMMIT} -X main.version=${VERSION}" -tags "$(BUILDTAGS)" -o runc .
+ go build -i -tags "$(BUILDTAGS)" -o runc .
static: $(RUNC_LINK)
CGO_ENABLED=1 go build -i -tags "$(BUILDTAGS) cgo static_build" -ldflags "-w -extldflags -static -X main.gitCommit=${COMMIT} -X main.version=${VERSION}" -o runc .
diff --git a/libcontainer/nsenter/nsexec.c b/libcontainer/nsenter/nsexec.c
index 668077a..f5d47eb 100644
--- a/libcontainer/nsenter/nsexec.c
+++ b/libcontainer/nsenter/nsexec.c
@@ -286,7 +286,7 @@ static void nl_parse(int fd, struct nlconfig_t *config)
size = NLMSG_PAYLOAD(&hdr, 0);
current = data = malloc(size);
if (!data)
- bail("failed to allocate %d bytes of memory for nl_payload", size);
+ bail("failed to allocate %zu bytes of memory for nl_payload", size);
len = read(fd, data, size);
if (len != size)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment