diff --git a/builder/amazon/chroot/lockfile_unix.go b/builder/amazon/chroot/lockfile_unix.go index 43e92af21..0d0f8c8f7 100644 --- a/builder/amazon/chroot/lockfile_unix.go +++ b/builder/amazon/chroot/lockfile_unix.go @@ -4,7 +4,8 @@ package chroot import ( "os" - "syscall" + + "golang.org/x/sys/unix" ) // See: http://linux.die.net/include/sys/file.h @@ -13,7 +14,7 @@ const LOCK_NB = 4 const LOCK_UN = 8 func lockFile(f *os.File) error { - err := syscall.Flock(int(f.Fd()), LOCK_EX) + err := unix.Flock(int(f.Fd()), LOCK_EX) if err != nil { return err } @@ -22,5 +23,5 @@ func lockFile(f *os.File) error { } func unlockFile(f *os.File) error { - return syscall.Flock(int(f.Fd()), LOCK_UN) + return unix.Flock(int(f.Fd()), LOCK_UN) } diff --git a/packer/config_file_unix.go b/packer/config_file_unix.go index 82260c2a2..512ac42ed 100644 --- a/packer/config_file_unix.go +++ b/packer/config_file_unix.go @@ -1,4 +1,4 @@ -// +build darwin freebsd linux netbsd openbsd +// +build darwin freebsd linux netbsd openbsd solaris package packer