summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2024-08-10 04:20:24 -0700
committerMichael Forney <mforney@mforney.org>2024-08-10 04:20:49 -0700
commitc15374ebf5fd8cdd09fcb92bf2549d10fb15640a (patch)
tree19e357c2f070a9e9f5e80f2367bcd34eb4367824
parent0eb0850eec36af11a0038cd8d878416281287637 (diff)
wireguard-tools: Fix build
-rw-r--r--.gitmodules1
-rw-r--r--pkg/wireguard-tools/patch/0001-Use-__asm__-keyword-instead-of-asm.patch39
m---------pkg/wireguard-tools/src0
3 files changed, 40 insertions, 0 deletions
diff --git a/.gitmodules b/.gitmodules
index 1f031739..df8a3e16 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -372,6 +372,7 @@
[submodule "pkg/wireguard-tools/src"]
path = pkg/wireguard-tools/src
url = https://git.zx2c4.com/wireguard-tools
+ ignore = all
[submodule "pkg/wl9/src"]
path = pkg/wl9/src
url = https://git.sr.ht/~mcf/wl9
diff --git a/pkg/wireguard-tools/patch/0001-Use-__asm__-keyword-instead-of-asm.patch b/pkg/wireguard-tools/patch/0001-Use-__asm__-keyword-instead-of-asm.patch
new file mode 100644
index 00000000..fbd95ca1
--- /dev/null
+++ b/pkg/wireguard-tools/patch/0001-Use-__asm__-keyword-instead-of-asm.patch
@@ -0,0 +1,39 @@
+From 2d278467c649c814853b0c43c142f6146512a4fc Mon Sep 17 00:00:00 2001
+From: Michael Forney <mforney@mforney.org>
+Date: Wed, 7 Aug 2024 15:00:01 -0700
+Subject: [PATCH] Use __asm__ keyword instead of asm
+
+---
+ src/curve25519.c | 2 +-
+ src/encoding.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/curve25519.c b/src/curve25519.c
+index 7121d1e..d3bc005 100644
+--- a/src/curve25519.c
++++ b/src/curve25519.c
+@@ -76,7 +76,7 @@ static __always_inline __unused void put_unaligned_le64(u64 s, u8 *d)
+ static noinline void memzero_explicit(void *s, size_t count)
+ {
+ memset(s, 0, count);
+- asm volatile("": :"r"(s) : "memory");
++ __asm__ volatile("": :"r"(s) : "memory");
+ }
+
+ #ifdef __SIZEOF_INT128__
+diff --git a/src/encoding.c b/src/encoding.c
+index 9b2cda5..57a7659 100644
+--- a/src/encoding.c
++++ b/src/encoding.c
+@@ -119,7 +119,7 @@ bool key_is_zero(const uint8_t key[static WG_KEY_LEN])
+
+ for (unsigned int i = 0; i < WG_KEY_LEN; ++i) {
+ acc |= key[i];
+- asm volatile("" : "=r"(acc) : "0"(acc));
++ __asm__ volatile("" : "=r"(acc) : "0"(acc));
+ }
+ return 1 & ((acc - 1) >> 8);
+ }
+--
+2.44.0
+
diff --git a/pkg/wireguard-tools/src b/pkg/wireguard-tools/src
-Subproject 2d278467c649c814853b0c43c142f6146512a4f
+Subproject 13f4ac4cb74b5a833fa7f825ba785b1e5774e84