diff options
author | Kali Kaneko (leap communications) <kali@leap.se> | 2018-12-13 19:45:48 +0100 |
---|---|---|
committer | Kali Kaneko (leap communications) <kali@leap.se> | 2018-12-13 19:47:11 +0100 |
commit | 81843a0477c5eba4b3d4f6ff932f748f9e1244e7 (patch) | |
tree | 6068ae0ff1d8ac617e2781fb8aa68200e71403f2 /vendor/github.com/oschwald/maxminddb-golang/mmap_unix.go | |
parent | ac56a90e21118dc1ddfc1bd5e69d87f157710412 (diff) |
vendor packages
Diffstat (limited to 'vendor/github.com/oschwald/maxminddb-golang/mmap_unix.go')
-rw-r--r-- | vendor/github.com/oschwald/maxminddb-golang/mmap_unix.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/vendor/github.com/oschwald/maxminddb-golang/mmap_unix.go b/vendor/github.com/oschwald/maxminddb-golang/mmap_unix.go new file mode 100644 index 0000000..d898d25 --- /dev/null +++ b/vendor/github.com/oschwald/maxminddb-golang/mmap_unix.go @@ -0,0 +1,15 @@ +// +build !windows,!appengine + +package maxminddb + +import ( + "golang.org/x/sys/unix" +) + +func mmap(fd int, length int) (data []byte, err error) { + return unix.Mmap(fd, 0, length, unix.PROT_READ, unix.MAP_SHARED) +} + +func munmap(b []byte) (err error) { + return unix.Munmap(b) +} |