vendor: Mega update all dependencies
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4080
This commit is contained in:
4
vendor/github.com/edsrzf/mmap-go/mmap.go
generated
vendored
4
vendor/github.com/edsrzf/mmap-go/mmap.go
generated
vendored
@@ -54,6 +54,10 @@ func Map(f *os.File, prot, flags int) (MMap, error) {
|
||||
// If length < 0, the entire file will be mapped.
|
||||
// If ANON is set in flags, f is ignored.
|
||||
func MapRegion(f *os.File, length int, prot, flags int, offset int64) (MMap, error) {
|
||||
if offset%int64(os.Getpagesize()) != 0 {
|
||||
return nil, errors.New("offset parameter must be a multiple of the system's page size")
|
||||
}
|
||||
|
||||
var fd uintptr
|
||||
if flags&ANON == 0 {
|
||||
fd = uintptr(f.Fd())
|
||||
|
||||
Reference in New Issue
Block a user