misc: updated dependencies

This commit is contained in:
evilsocket 2019-01-17 19:59:37 +01:00
parent 63810a5192
commit 34db9e5978
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
174 changed files with 32222 additions and 6989 deletions

View file

@ -1,19 +1,20 @@
// +build !darwin,!arm,!windows,!mipsle,!mips
// +build !darwin,!arm,!windows,!mipsle,!mips,!386
package raw
import (
"syscall"
"time"
"golang.org/x/sys/unix"
)
// newTimeval transforms a duration into a syscall.Timeval struct.
// newTimeval transforms a duration into a unix.Timeval struct.
// An error is returned in case of zero time value.
func newTimeval(timeout time.Duration) (*syscall.Timeval, error) {
func newTimeval(timeout time.Duration) (*unix.Timeval, error) {
if timeout < time.Microsecond {
return nil, &timeoutError{}
}
return &syscall.Timeval{
return &unix.Timeval{
Sec: int64(timeout / time.Second),
Usec: int64(timeout % time.Second / time.Microsecond),
}, nil