Skip to content

Commit

Permalink
Make #4278 buildable on Mac OS X
Browse files Browse the repository at this point in the history
  • Loading branch information
kzys committed Feb 28, 2014
1 parent d6deeab commit 47c36f2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkg/system/stat_unsupported.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ package system

import "syscall"

func getLastAccess(stat *syscall.Stat_t) syscall.Timespec {
func GetLastAccess(stat *syscall.Stat_t) syscall.Timespec {
return stat.Atimespec
}

func getLastModification(stat *syscall.Stat_t) syscall.Timespec {
func GetLastModification(stat *syscall.Stat_t) syscall.Timespec {
return stat.Mtimespec
}
7 changes: 7 additions & 0 deletions pkg/system/system.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package system

import "errors"

var (
ErrNotImplemented = errors.New("not implemented")
)
3 changes: 3 additions & 0 deletions pkg/system/utimes_unsupported.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ package system

import "syscall"

// to avoid "imported and not used" error
var _ = syscall.Open

func LUtimesNano(path string, ts []syscall.Timespec) error {
return ErrNotImplemented
}
Expand Down
2 changes: 0 additions & 2 deletions pkg/system/xattrs_unsupported.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

package system

import "syscall"

func Lgetxattr(path string, attr string) ([]byte, error) {
return nil, ErrNotImplemented
}
Expand Down

0 comments on commit 47c36f2

Please sign in to comment.