From 65765b60994ea6ce8f2ce2c586e7839dc01c424a Mon Sep 17 00:00:00 2001 From: zztaki Date: Wed, 22 Nov 2023 19:25:35 -0700 Subject: [PATCH] [FIX]: make build error with musl1.2.4 Signed-off-by: zztaki --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 90d211200..8244624db 100644 --- a/Makefile +++ b/Makefile @@ -5,12 +5,13 @@ GOPROXY := "https://goproxy.cn,direct" GOOS := $(if $(GOOS),$(GOOS),$(shell go env GOOS)) GOARCH := $(if $(GOARCH),$(GOARCH),$(shell go env GOARCH)) CGO_LDFLAGS := "-static" +CGO_CFLAGS := "-D_LARGEFILE64_SOURCE" CC := musl-gcc GOENV := GO111MODULE=on GOENV += GOPROXY=$(GOPROXY) GOENV += CC=$(CC) -GOENV += CGO_ENABLED=1 CGO_LDFLAGS=$(CGO_LDFLAGS) +GOENV += CGO_ENABLED=1 CGO_LDFLAGS=$(CGO_LDFLAGS) CGO_CFLAGS=$(CGO_CFLAGS) GOENV += GOOS=$(GOOS) GOARCH=$(GOARCH) GOLANGCILINT_VERSION ?= v1.50.0 GOBIN := $(shell go env GOPATH)/bin