summaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/sys/unix/syscall_unix.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-05-21 09:53:49 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2020-05-21 09:53:49 -0400
commit2ecd15c0d236916d2894c87c73aeeeb08978614f (patch)
treec6b9f81b57d95b6ed290340fbdc065ec36d28b8f /vendor/golang.org/x/sys/unix/syscall_unix.go
parente9b344266a563a3dfcf693fc817f6b8cc0b7d815 (diff)
downloadpodman-2ecd15c0d236916d2894c87c73aeeeb08978614f.tar.gz
podman-2ecd15c0d236916d2894c87c73aeeeb08978614f.tar.bz2
podman-2ecd15c0d236916d2894c87c73aeeeb08978614f.zip
Bump github.com/onsi/ginkgo from 1.12.0 to 1.12.2
Bumps [github.com/onsi/ginkgo](https://github.com/onsi/ginkgo) from 1.12.0 to 1.12.2. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/ginkgo/compare/v1.12.0...v1.12.2) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'vendor/golang.org/x/sys/unix/syscall_unix.go')
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_unix.go17
1 files changed, 8 insertions, 9 deletions
diff --git a/vendor/golang.org/x/sys/unix/syscall_unix.go b/vendor/golang.org/x/sys/unix/syscall_unix.go
index 8f710d014..400ba9fbc 100644
--- a/vendor/golang.org/x/sys/unix/syscall_unix.go
+++ b/vendor/golang.org/x/sys/unix/syscall_unix.go
@@ -12,6 +12,8 @@ import (
"sync"
"syscall"
"unsafe"
+
+ "golang.org/x/sys/internal/unsafeheader"
)
var (
@@ -113,15 +115,12 @@ func (m *mmapper) Mmap(fd int, offset int64, length int, prot int, flags int) (d
return nil, errno
}
- // Slice memory layout
- var sl = struct {
- addr uintptr
- len int
- cap int
- }{addr, length, length}
-
- // Use unsafe to turn sl into a []byte.
- b := *(*[]byte)(unsafe.Pointer(&sl))
+ // Use unsafe to convert addr into a []byte.
+ var b []byte
+ hdr := (*unsafeheader.Slice)(unsafe.Pointer(&b))
+ hdr.Data = unsafe.Pointer(addr)
+ hdr.Cap = length
+ hdr.Len = length
// Register mapping in m and return it.
p := &b[cap(b)-1]