mirror of
https://github.com/golang/go
synced 2024-11-18 08:54:45 -07:00
x/tools/cmd/heapview/internal/core: stub mmapfile for !darwin,!linux
mmapfile.go uses symbols in the syscall package that are not defined on windows and some other operating systems. Temporarily buildtag-restrict mmapfile to darwin and linux (the platforms easiest for me to test) to fix the build. Change-Id: Ib056608a655b6d32170cd86deac785811e7bc0d1 Reviewed-on: https://go-review.googlesource.com/26830 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
62f0028207
commit
68cf18548e
@ -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 darwin linux
|
||||
|
||||
package core
|
||||
|
||||
import (
|
||||
|
14
cmd/heapview/internal/core/mmapfile_other.go
Normal file
14
cmd/heapview/internal/core/mmapfile_other.go
Normal file
@ -0,0 +1,14 @@
|
||||
// Copyright 2016 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build !darwin,!linux
|
||||
|
||||
package core
|
||||
|
||||
// TODO(matloob): perhaps use the more portable golang.org/x/exp/mmap
|
||||
// instead of the mmap code in mmapfile.go.
|
||||
|
||||
type mmapFile struct{}
|
||||
|
||||
func (m *mmapFile) Close() error { return nil }
|
Loading…
Reference in New Issue
Block a user