1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
Description: fix build on armel & armhf
Author: Félix Sipma <felix@debian.org>
Last-Update: 2024-09-11
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/examples/loopback/linux-64bit.go
+++ b/examples/loopback/linux-64bit.go
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD
// license that can be found in the LICENSE file.
-//go:build linux && !386
-// +build linux,!386
+//go:build linux && !(386||arm)
+// +build linux,!386 linux,!arm
package main
--- /dev/null
+++ b/examples/loopback/linux_arm.go
@@ -0,0 +1,20 @@
+// Copyright 2017 Keybase Inc. All rights reserved.
+// Use of this source code is governed by a BSD
+// license that can be found in the LICENSE file.
+
+//go:build linux && arm
+// +build linux,arm
+
+package main
+
+import (
+ "syscall"
+ "time"
+)
+
+func tToTv(t time.Time) (tv syscall.Timeval) {
+ tv.Sec = int32(t.Unix())
+ tv.Usec = int32(t.UnixNano() % time.Second.Nanoseconds() /
+ time.Microsecond.Nanoseconds())
+ return tv
+}
|