Skip to content

Commit e7b4680

Browse files
committed
unix: expose mmap calls on z/OS
1 parent 360f961 commit e7b4680

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

unix/mmap_nomremap.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build aix || darwin || dragonfly || freebsd || openbsd || solaris
5+
//go:build aix || darwin || dragonfly || freebsd || openbsd || solaris || zos
66

77
package unix
88

unix/syscall_zos_s390x.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1520,6 +1520,14 @@ func (m *mmapper) Munmap(data []byte) (err error) {
15201520
return nil
15211521
}
15221522

1523+
func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
1524+
return mapper.Mmap(fd, offset, length, prot, flags)
1525+
}
1526+
1527+
func Munmap(b []byte) (err error) {
1528+
return mapper.Munmap(b)
1529+
}
1530+
15231531
func Read(fd int, p []byte) (n int, err error) {
15241532
n, err = read(fd, p)
15251533
if raceenabled {

0 commit comments

Comments
 (0)