Skip to content

Commit

Permalink
mmap: use Linux support for Darwin as well.
Browse files Browse the repository at this point in the history
mmap is available on Darwin using the same syscall. We can
simply build the same file to make it work on macOS as well.

Change-Id: I31bd0813efbf502287317dde8b0390c91d72aeb7
Reviewed-on: https://go-review.googlesource.com/41475
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
  • Loading branch information
rasky authored and bradfitz committed Apr 23, 2017
1 parent cf79bb0 commit 239d448
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mmap/mmap_other.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// +build !linux,!windows
// +build !linux,!windows,!darwin

// Package mmap provides a way to memory-map a file.
package mmap
Expand Down
2 changes: 2 additions & 0 deletions mmap/mmap_linux.go → mmap/mmap_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// +build linux darwin

// Package mmap provides a way to memory-map a file.
package mmap

Expand Down

0 comments on commit 239d448

Please sign in to comment.