mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-03 07:37:34 -04:00
unix: add gccgo support
With these changes the package builds, and the tests pass, using gccgo on amd64 GNU/Linux. I have not tested other systems but I don't know why they wouldn't work. Change-Id: I727365daef55f158657eb89afbfcdbf3334610d1 Reviewed-on: https://go-review.googlesource.com/9842 Reviewed-by: Minux Ma <minux@golang.org> Reviewed-by: Rob Pike <r@golang.org>
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
// Copyright 2015 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 gccgo,linux,amd64
|
||||
|
||||
package unix
|
||||
|
||||
import "syscall"
|
||||
|
||||
//extern gettimeofday
|
||||
func realGettimeofday(*Timeval, *byte) int32
|
||||
|
||||
func gettimeofday(tv *Timeval) (err syscall.Errno) {
|
||||
r := realGettimeofday(tv, nil)
|
||||
if r < 0 {
|
||||
return syscall.GetErrno()
|
||||
}
|
||||
return 0
|
||||
}
|
||||
Reference in New Issue
Block a user