From ed77fde4691ba2ff25f84078920e379464998393 Mon Sep 17 00:00:00 2001 From: Koki Kato Date: Tue, 8 Oct 2024 11:34:54 +0900 Subject: [PATCH] Fix build on WASM --- mmap_wasm.go | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 mmap_wasm.go diff --git a/mmap_wasm.go b/mmap_wasm.go new file mode 100644 index 0000000..cfe1c50 --- /dev/null +++ b/mmap_wasm.go @@ -0,0 +1,27 @@ +// Copyright 2024 Evan Shaw. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package mmap + +import "syscall" + +func mmap(len int, inprot, inflags, fd uintptr, off int64) ([]byte, error) { + return nil, syscall.ENOTSUP +} + +func (m MMap) flush() error { + return syscall.ENOTSUP +} + +func (m MMap) lock() error { + return syscall.ENOTSUP +} + +func (m MMap) unlock() error { + return syscall.ENOTSUP +} + +func (m MMap) unmap() error { + return syscall.ENOTSUP +}