From 81843a0477c5eba4b3d4f6ff932f748f9e1244e7 Mon Sep 17 00:00:00 2001 From: "Kali Kaneko (leap communications)" Date: Thu, 13 Dec 2018 19:45:48 +0100 Subject: vendor packages --- vendor/github.com/oschwald/maxminddb-golang/mmap_unix.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 vendor/github.com/oschwald/maxminddb-golang/mmap_unix.go (limited to 'vendor/github.com/oschwald/maxminddb-golang/mmap_unix.go') 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) +} -- cgit v1.2.3