Skip to content

Commit

Permalink
Merge pull request #66 from sul3n3t/compile-more-platforms
Browse files Browse the repository at this point in the history
Build on ppc64(le), s390x
  • Loading branch information
stevvooe authored May 2, 2017
2 parents 1d866f3 + 55d0f95 commit 67a877d
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sysx/xattr.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ package sysx

import (
"bytes"
"fmt"
"syscall"
)

const defaultXattrBufferSize = 5

var ErrNotSupported = fmt.Errorf("not supported")

type listxattrFunc func(path string, dest []byte) (int, error)

func listxattrAll(path string, listFunc listxattrFunc) ([]string, error) {
Expand Down
19 changes: 19 additions & 0 deletions sysx/xattr_linux_ppc64.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package sysx

import "github.com/pkg/errors"

func llistxattr(path string, dest []byte) (sz int, err error) {
return 0, errors.Wrap(ErrNotSupported, "llistxattr not implemented on ppc64")
}

func lremovexattr(path string, attr string) (err error) {
return errors.Wrap(ErrNotSupported, "lremovexattr not implemented on ppc64")
}

func lsetxattr(path string, attr string, data []byte, flags int) (err error) {
return errors.Wrap(ErrNotSupported, "lsetxattr not implemented on ppc64")
}

func lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
return 0, errors.Wrap(ErrNotSupported, "lgetxattr not implemented on ppc64")
}
19 changes: 19 additions & 0 deletions sysx/xattr_linux_ppc64le.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package sysx

import "github.com/pkg/errors"

func llistxattr(path string, dest []byte) (sz int, err error) {
return 0, errors.Wrap(ErrNotSupported, "llistxattr not implemented on ppc64le")
}

func lremovexattr(path string, attr string) (err error) {
return errors.Wrap(ErrNotSupported, "lremovexattr not implemented on ppc64le")
}

func lsetxattr(path string, attr string, data []byte, flags int) (err error) {
return errors.Wrap(ErrNotSupported, "lsetxattr not implemented on ppc64le")
}

func lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
return 0, errors.Wrap(ErrNotSupported, "lgetxattr not implemented on ppc64le")
}
19 changes: 19 additions & 0 deletions sysx/xattr_linux_s390x.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package sysx

import "github.com/pkg/errors"

func llistxattr(path string, dest []byte) (sz int, err error) {
return 0, errors.Wrap(ErrNotSupported, "llistxattr not implemented on s390x")
}

func lremovexattr(path string, attr string) (err error) {
return errors.Wrap(ErrNotSupported, "lremovexattr not implemented on s390x")
}

func lsetxattr(path string, attr string, data []byte, flags int) (err error) {
return errors.Wrap(ErrNotSupported, "lsetxattr not implemented on s390x")
}

func lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
return 0, errors.Wrap(ErrNotSupported, "lgetxattr not implemented on s390x")
}

0 comments on commit 67a877d

Please sign in to comment.