Skip to content

Commit 580b26d

Browse files
zztakicaoxianfei1
authored andcommitted
[FIX]: make build error with musl1.2.4
Signed-off-by: zztaki <[email protected]>
1 parent 534e2cc commit 580b26d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ GOPROXY := "https://goproxy.cn,direct"
55
GOOS := $(if $(GOOS),$(GOOS),$(shell go env GOOS))
66
GOARCH := $(if $(GOARCH),$(GOARCH),$(shell go env GOARCH))
77
CGO_LDFLAGS := "-static"
8+
CGO_CFLAGS := "-D_LARGEFILE64_SOURCE"
89
CC := musl-gcc
910

1011
GOENV := GO111MODULE=on
1112
GOENV += GOPROXY=$(GOPROXY)
1213
GOENV += CC=$(CC)
13-
GOENV += CGO_ENABLED=1 CGO_LDFLAGS=$(CGO_LDFLAGS)
14+
GOENV += CGO_ENABLED=1 CGO_LDFLAGS=$(CGO_LDFLAGS) CGO_CFLAGS=$(CGO_CFLAGS)
1415
GOENV += GOOS=$(GOOS) GOARCH=$(GOARCH)
1516
GOLANGCILINT_VERSION ?= v1.50.0
1617
GOBIN := $(shell go env GOPATH)/bin

0 commit comments

Comments
 (0)