diff --git a/internal/bsdaily/copy_linux.go b/internal/bsdaily/copy_linux.go index e744005..12733ad 100644 --- a/internal/bsdaily/copy_linux.go +++ b/internal/bsdaily/copy_linux.go @@ -4,13 +4,13 @@ package bsdaily import ( "os" - "syscall" + "golang.org/x/sys/unix" ) func applyFileAdvice(file *os.File, size int64) { fd := int(file.Fd()) // POSIX_FADV_SEQUENTIAL = 2 - _ = syscall.Fadvise(fd, 0, size, 2) + _ = unix.Fadvise(fd, 0, size, 2) // POSIX_FADV_WILLNEED = 3 - prefetch file into cache - _ = syscall.Fadvise(fd, 0, size, 3) + _ = unix.Fadvise(fd, 0, size, 3) } \ No newline at end of file