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:
Alan Donovan 2014-03-04 13:34:45 -05:00
parent ddcdb3637a
commit 53324e8992
1 changed files with 18 additions and 0 deletions

View File

@ -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)}
}