From c8c2c5f8e5da36374d0366970804b7fb6564a0b4 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Fri, 1 Mar 2024 01:43:06 +0200 Subject: [PATCH] lib/fs: fix GOOS=windows build after f8baf29b6ef2fd268e460449fc591532b72fa22f --- lib/fs/fs_windows.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/fs/fs_windows.go b/lib/fs/fs_windows.go index 83b5483a1..1c2c28097 100644 --- a/lib/fs/fs_windows.go +++ b/lib/fs/fs_windows.go @@ -3,7 +3,6 @@ package fs import ( "fmt" "os" - "reflect" "sync" "unsafe" @@ -89,7 +88,7 @@ func mmap(fd int, length int) ([]byte, error) { windows.CloseHandle(h) return nil, os.NewSyscallError("MapViewOfFile", errno) } - data := unsafe.Slice(addr, length) + data := unsafe.Slice((*byte)(unsafe.Pointer(addr)), length) mmapByAddrLock.Lock() mmapByAddr[addr] = h