Skip to content

Instantly share code, notes, and snippets.

@mrunalp
Created August 17, 2016 18:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrunalp/1f4273858751a3aa8b0b82932e342b04 to your computer and use it in GitHub Desktop.
Save mrunalp/1f4273858751a3aa8b0b82932e342b04 to your computer and use it in GitHub Desktop.
diff --git a/Makefile b/Makefile
index a84c539..de40636 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 -ldflags "-X main.gitCommit ${COMMIT} -X main.version ${VERSION}" -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