forked from influxdata/influxdb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
more portable solution for Mmap/Munmap influxdata#4787
- Loading branch information
1 parent
f7ab798
commit 19d3f5b
Showing
4 changed files
with
35 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// portability wrapper for Mmap/Munmap | ||
// +build plan9 | ||
|
||
package tsm1 | ||
|
||
import ( | ||
"golang.org/x/sys/plan9" | ||
) | ||
|
||
var Mmap = plan9.Mmap | ||
var Munmap = plan9.Munmap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// portability wrapper for Mmap/Munmap | ||
// +build !windows,!plan9 | ||
|
||
package tsm1 | ||
|
||
import ( | ||
"golang.org/x/sys/unix" | ||
) | ||
|
||
var Mmap = unix.Mmap | ||
var Munmap = unix.Munmap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// portability wrapper for Mmap/Munmap | ||
// +build windows | ||
|
||
package tsm1 | ||
|
||
import ( | ||
"golang.org/x/sys/windows" | ||
) | ||
|
||
var Mmap = windows.Mmap | ||
var Munmap = windows.Munmap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters