mount: keep the xattr flag constants off freebsd (#10552)

* mount: keep the xattr flag constants off freebsd

x/sys/unix has no XATTR_CREATE or XATTR_REPLACE there, and weedfs_xattr.go
is already tagged away from freebsd for that reason. Putting them in a
!windows file dragged them back in, so master stopped building for
freebsd.

* ci: cross-compile freebsd and darwin too

The windows-only check missed a freebsd break in the very file it was
added to guard, because nothing else on a pull request compiles them.
This commit is contained in:
Chris Lu
2026-08-03 14:47:20 -07:00
committed by GitHub
parent c191b2fe01
commit 4992ac1ca9
3 changed files with 21 additions and 14 deletions
+10 -6
View File
@@ -75,8 +75,8 @@ jobs:
- name: Build
run: cd weed; go build -tags "elastic gocdk sqlite ydb tarantool tikv rclone" -v .
build-windows:
name: Build windows
build-cross:
name: Build cross-platform
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
@@ -85,10 +85,14 @@ jobs:
uses: actions/setup-go@v7
with:
go-version-file: 'go.mod'
# weed/mount builds here but cannot mount yet. Without this the unix-only
# syscall constants it needs creep back in unnoticed.
- name: Build windows/amd64
run: GOOS=windows GOARCH=amd64 go build ./weed/...
# Nothing else on a PR compiles these, so per-OS syscall constants creep
# back into shared files unnoticed and only a release build catches it.
- name: Cross-compile
run: |
for target in windows/amd64 windows/arm64 freebsd/amd64 darwin/arm64; do
echo "== $target"
GOOS=${target%/*} GOARCH=${target#*/} go build ./weed/...
done
test:
name: Test