mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
lib/fs: fix GOOS=windows build after f8baf29b6e
This commit is contained in:
parent
d62b14685a
commit
c8c2c5f8e5
1 changed files with 1 additions and 2 deletions
|
@ -3,7 +3,6 @@ package fs
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"reflect"
|
|
||||||
"sync"
|
"sync"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
|
@ -89,7 +88,7 @@ func mmap(fd int, length int) ([]byte, error) {
|
||||||
windows.CloseHandle(h)
|
windows.CloseHandle(h)
|
||||||
return nil, os.NewSyscallError("MapViewOfFile", errno)
|
return nil, os.NewSyscallError("MapViewOfFile", errno)
|
||||||
}
|
}
|
||||||
data := unsafe.Slice(addr, length)
|
data := unsafe.Slice((*byte)(unsafe.Pointer(addr)), length)
|
||||||
|
|
||||||
mmapByAddrLock.Lock()
|
mmapByAddrLock.Lock()
|
||||||
mmapByAddr[addr] = h
|
mmapByAddr[addr] = h
|
||||||
|
|
Loading…
Reference in a new issue