aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tunnel/tools/libwg-go/goruntime-boottime-over-monotonic.diff
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-02-22 02:38:46 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2021-02-22 15:27:53 +0100
commit11301617d24cd451065c5682e4170f8d4d781c1d (patch)
tree7bb77be8139606bb6b3b1ed3b4beadf18c03cfd4 /tunnel/tools/libwg-go/goruntime-boottime-over-monotonic.diff
parentbuild: upgrade to ZXING 4.1.0 (diff)
downloadwireguard-android-11301617d24cd451065c5682e4170f8d4d781c1d.tar.xz
wireguard-android-11301617d24cd451065c5682e4170f8d4d781c1d.zip
tunnel: update to go 1.16 and newer api
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r--tunnel/tools/libwg-go/goruntime-boottime-over-monotonic.diff28
1 files changed, 14 insertions, 14 deletions
diff --git a/tunnel/tools/libwg-go/goruntime-boottime-over-monotonic.diff b/tunnel/tools/libwg-go/goruntime-boottime-over-monotonic.diff
index 63d68797..5cbc2256 100644
--- a/tunnel/tools/libwg-go/goruntime-boottime-over-monotonic.diff
+++ b/tunnel/tools/libwg-go/goruntime-boottime-over-monotonic.diff
@@ -1,6 +1,6 @@
-From 1d1ba1da11afd73008c0e942db7621697055a6b6 Mon Sep 17 00:00:00 2001
+From b83553d9f260ba20c6faaa52e6fe6f74309eb41a Mon Sep 17 00:00:00 2001
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
-Date: Tue, 15 Sep 2020 13:39:22 +0200
+Date: Mon, 22 Feb 2021 02:36:03 +0100
Subject: [PATCH] runtime: use CLOCK_BOOTTIME in nanotime on Linux
This makes timers account for having expired while a computer was
@@ -28,10 +28,10 @@ Change-Id: I7b2a6ca0c5bc5fce57ec0eeafe7b68270b429321
8 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/runtime/sys_linux_386.s b/src/runtime/sys_linux_386.s
-index 5b9b638ad7..448ad8b2e6 100644
+index 1e3a834812..78b6021fc7 100644
--- a/src/runtime/sys_linux_386.s
+++ b/src/runtime/sys_linux_386.s
-@@ -339,13 +339,13 @@ noswitch:
+@@ -337,13 +337,13 @@ noswitch:
LEAL 8(SP), BX // &ts (struct timespec)
MOVL BX, 4(SP)
@@ -48,18 +48,18 @@ index 5b9b638ad7..448ad8b2e6 100644
INVOKE_SYSCALL
diff --git a/src/runtime/sys_linux_amd64.s b/src/runtime/sys_linux_amd64.s
-index fe9c6bce85..4836a7c774 100644
+index 37cb8dad03..e8b730bcaa 100644
--- a/src/runtime/sys_linux_amd64.s
+++ b/src/runtime/sys_linux_amd64.s
-@@ -311,7 +311,7 @@ noswitch:
- MOVQ runtime·vdsoClockgettimeSym(SB), AX
- CMPQ AX, $0
- JEQ fallback
+@@ -302,7 +302,7 @@ noswitch:
+ SUBQ $16, SP // Space for results
+ ANDQ $~15, SP // Align for C code
+
- MOVL $1, DI // CLOCK_MONOTONIC
+ MOVL $7, DI // CLOCK_BOOTTIME
LEAQ 0(SP), SI
- CALL AX
- MOVQ 0(SP), AX // sec
+ MOVQ runtime·vdsoClockgettimeSym(SB), AX
+ CMPQ AX, $0
diff --git a/src/runtime/sys_linux_arm.s b/src/runtime/sys_linux_arm.s
index 475f52344c..bb567abcf4 100644
--- a/src/runtime/sys_linux_arm.s
@@ -105,10 +105,10 @@ index 198a5bacef..9715387f36 100644
CBZ R2, fallback
diff --git a/src/runtime/sys_linux_mips64x.s b/src/runtime/sys_linux_mips64x.s
-index afad056d06..2c9162b903 100644
+index c3e9f37694..e3879acd38 100644
--- a/src/runtime/sys_linux_mips64x.s
+++ b/src/runtime/sys_linux_mips64x.s
-@@ -304,7 +304,7 @@ noswitch:
+@@ -312,7 +312,7 @@ noswitch:
AND $~15, R1 // Align for C code
MOVV R1, R29
@@ -157,5 +157,5 @@ index c15a1d5364..f52c4d5098 100644
MOVW $SYS_clock_gettime, R1
SYSCALL
--
-2.28.0
+2.30.1