go/ssa/interp: add syscall.Sysctl to Darwin.
This fixes a recent test breakge now that os.init calls it (on Darwin). LGTM=gri R=gri CC=golang-codereviews https://golang.org/cl/68000048
This commit is contained in:
parent
ddcdb3637a
commit
53324e8992
|
|
@ -0,0 +1,18 @@
|
||||||
|
// Copyright 2014 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
|
||||||
|
|
||||||
|
package interp
|
||||||
|
|
||||||
|
import "syscall"
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
externals["syscall.Sysctl"] = ext۰syscall۰Sysctl
|
||||||
|
}
|
||||||
|
|
||||||
|
func ext۰syscall۰Sysctl(fr *frame, args []value) value {
|
||||||
|
r, err := syscall.Sysctl(args[0].(string))
|
||||||
|
return tuple{r, wrapError(err)}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue