From ae9177b3f3e178bb70d89010677f1e739a5bbec6 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Fri, 18 Mar 2022 06:40:29 +0100 Subject: [PATCH] - added x32 patch --- openconnect-x32.patch | 24 ++++++++++++++++++++++++ openconnect.spec | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 openconnect-x32.patch diff --git a/openconnect-x32.patch b/openconnect-x32.patch new file mode 100644 index 0000000..32b66c6 --- /dev/null +++ b/openconnect-x32.patch @@ -0,0 +1,24 @@ +--- openconnect-8.20/vhost.c.orig 2021-07-27 15:49:16.000000000 +0200 ++++ openconnect-8.20/vhost.c 2022-03-18 06:33:02.298507500 +0100 +@@ -89,9 +89,9 @@ static int setup_vring(struct openconnec + + struct vhost_vring_addr va = { }; + va.index = idx; +- va.desc_user_addr = (uint64_t)vring->desc; +- va.avail_user_addr = (uint64_t)vring->avail; +- va.used_user_addr = (uint64_t)vring->used; ++ va.desc_user_addr = (uintptr_t)vring->desc; ++ va.avail_user_addr = (uintptr_t)vring->avail; ++ va.used_user_addr = (uintptr_t)vring->used; + if (ioctl(vpninfo->vhost_fd, VHOST_SET_VRING_ADDR, &va) < 0) { + ret = -errno; + vpn_progress(vpninfo, PRG_ERR, _("Failed to set vring #%d base: %s\n"), +@@ -457,7 +457,7 @@ static inline int process_ring(struct op + + if (!tx) + ring->desc[desc].flags = vio16(VRING_DESC_F_WRITE); +- ring->desc[desc].addr = vio64((uint64_t)this + pkt_offset(virtio.h)); ++ ring->desc[desc].addr = vio64((uintptr_t)this + pkt_offset(virtio.h)); + ring->desc[desc].len = vio32(this->len + sizeof(this->virtio.h)); + barrier(); + diff --git a/openconnect.spec b/openconnect.spec index 36af88f..50a7de5 100644 --- a/openconnect.spec +++ b/openconnect.spec @@ -18,6 +18,7 @@ Group: Applications/Networking Source0: ftp://ftp.infradead.org/pub/openconnect/%{name}-%{version}.tar.gz # Source0-md5: 26218ee45fea950ebcc65be242f3eb42 Patch0: %{name}-am.patch +Patch1: %{name}-x32.patch URL: http://www.infradead.org/openconnect.html BuildRequires: autoconf >= 2.63 BuildRequires: automake >= 1:1.10 @@ -114,6 +115,7 @@ Bashowe dopełnianie argumentów polecenia openconnect. %prep %setup -q %patch0 -p1 +%patch1 -p1 %build %{__libtoolize} -- 2.44.0