From 87ba458273dc4e1cfef4d6d43faffdcf7e9077be Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Fri, 16 Sep 2022 12:43:22 -0700 Subject: [PATCH] syscall.ENODATA is not defined on unsupported OS (#69) ENODATA may not be defined use a dummy value from netbsd errno --- .github/workflows/build.yml | 1 + xattr_unsupported.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 855e594..2f1adf7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,6 +21,7 @@ jobs: run: | GOOS=freebsd go build GOOS=windows go build + GOOS=openbsd go build go build -v . - name: Test diff --git a/xattr_unsupported.go b/xattr_unsupported.go index 4153dec..8886fbd 100644 --- a/xattr_unsupported.go +++ b/xattr_unsupported.go @@ -10,7 +10,7 @@ import ( const ( // We need to use the default for non supported operating systems - ENOATTR = syscall.ENODATA + ENOATTR = syscall.Errno(0x59) ) // XATTR_SUPPORTED will be true if the current platform is supported