From 8485371ad33a572f0b6a6703a65d41079a41f750 Mon Sep 17 00:00:00 2001 From: Deluan Date: Thu, 15 Jan 2026 19:26:53 -0500 Subject: [PATCH] fix: build on Go 1.25.6 Signed-off-by: Deluan --- .devcontainer/Dockerfile | 2 ++ Dockerfile | 1 + Makefile | 2 ++ 3 files changed, 5 insertions(+) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 6cf7a5e4e..078267fae 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -23,5 +23,7 @@ RUN DOWNLOAD_ARCH="linux-${TARGETARCH}" \ && rmdir /usr/include/taglib \ && rm /tmp/cross-taglib.tar.gz /usr/provenance.json +ENV CGO_CFLAGS_ALLOW="--define-prefix" + # [Optional] Uncomment this line to install global node packages. # RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g " 2>&1 diff --git a/Dockerfile b/Dockerfile index 221d54ebd..64b1c768a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -94,6 +94,7 @@ RUN --mount=type=bind,source=. \ # Setup CGO cross-compilation environment xx-go --wrap export CGO_ENABLED=1 + export CGO_CFLAGS_ALLOW="--define-prefix" export PKG_CONFIG_PATH=/taglib/lib/pkgconfig cat $(go env GOENV) diff --git a/Makefile b/Makefile index 392de1302..0276081f4 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,8 @@ GO_VERSION=$(shell grep "^go " go.mod | cut -f 2 -d ' ') NODE_VERSION=$(shell cat .nvmrc) +export CGO_CFLAGS_ALLOW=--define-prefix + ifneq ("$(wildcard .git/HEAD)","") GIT_SHA=$(shell git rev-parse --short HEAD) GIT_TAG=$(shell git describe --tags `git rev-list --tags --max-count=1`)-SNAPSHOT