commit: 331061b85b868bb1461100ab6a2d17432cea4d1d Author: William Hubbs <williamh <AT> gentoo <DOT> org> AuthorDate: Thu Aug 17 17:43:29 2023 +0000 Commit: William Hubbs <williamh <AT> gentoo <DOT> org> CommitDate: Thu Aug 17 17:52:08 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=331061b8
net-vpn/ovpn-dco: allow building with newer kernels Closes: https://bugs.gentoo.org/912169 Signed-off-by: William Hubbs <williamh <AT> gentoo.org> ...0001-ovpn-dco-include-new-GSO-header-file.patch | 76 ++++++++++++++++++++++ net-vpn/ovpn-dco/ovpn-dco-0.2.20230426.ebuild | 4 ++ 2 files changed, 80 insertions(+) diff --git a/net-vpn/ovpn-dco/files/0001-ovpn-dco-include-new-GSO-header-file.patch b/net-vpn/ovpn-dco/files/0001-ovpn-dco-include-new-GSO-header-file.patch new file mode 100644 index 000000000000..50e748cb5f0d --- /dev/null +++ b/net-vpn/ovpn-dco/files/0001-ovpn-dco-include-new-GSO-header-file.patch @@ -0,0 +1,76 @@ +From dba96d203f960356b477291d6a58d30fc096fbe4 Mon Sep 17 00:00:00 2001 +From: Antonio Quartulli <[email protected]> +Date: Wed, 16 Aug 2023 22:15:01 +0200 +Subject: [PATCH] ovpn-dco: include new GSO header file + +GSO code has ben moved to its own files, therefore a new header +needs to be included accordingly. + +This patch also provides some compat files so that ovpn-dco can +continue to compile also on older kernels. + +Fixes: https://github.com/OpenVPN/ovpn-dco/issues/42 +Signed-off-by: Antonio Quartulli <[email protected]> +--- + Makefile | 4 ++-- + compat-include/net/gso.h | 20 ++++++++++++++++++++ + drivers/net/ovpn-dco/ovpn.c | 1 + + 3 files changed, 23 insertions(+), 2 deletions(-) + create mode 100644 compat-include/net/gso.h + +diff --git a/Makefile b/Makefile +index a36a4d2..fe535e2 100644 +--- a/Makefile ++++ b/Makefile +@@ -34,8 +34,8 @@ ELFLAG := $(EL8FLAG) $(EL9FLAG) + NOSTDINC_FLAGS += \ + -I$(PWD)/include/ \ + $(CFLAGS) $(ELFLAG) \ +- -include $(PWD)/linux-compat.h +-# -I$(PWD)/compat-include/ ++ -include $(PWD)/linux-compat.h \ ++ -I$(PWD)/compat-include/ + + ifneq ($(REVISION),) + NOSTDINC_FLAGS += -DOVPN_DCO_VERSION=\"$(REVISION)\" +diff --git a/compat-include/net/gso.h b/compat-include/net/gso.h +new file mode 100644 +index 0000000..2e41c8b +--- /dev/null ++++ b/compat-include/net/gso.h +@@ -0,0 +1,20 @@ ++/* SPDX-License-Identifier: GPL-2.0-only */ ++/* OpenVPN data channel accelerator ++ * ++ * Copyright (C) 2023 OpenVPN, Inc. ++ * ++ * Author: Antonio Quartulli <[email protected]> ++ */ ++ ++#ifndef _NET_OVPN_COMPAT_NET_GSO_H ++#define _NET_OVPN_COMPAT_NET_GSO_H ++ ++#include <linux/version.h> ++ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 10) ++#include_next <net/gso.h> ++#else ++#include <linux/netdevice.h> ++#endif ++ ++#endif /* _NET_OVPN_COMPAT_NET_GSO_H */ +diff --git a/drivers/net/ovpn-dco/ovpn.c b/drivers/net/ovpn-dco/ovpn.c +index 772a34b..82e9f94 100644 +--- a/drivers/net/ovpn-dco/ovpn.c ++++ b/drivers/net/ovpn-dco/ovpn.c +@@ -22,6 +22,7 @@ + #include "udp.h" + + #include <linux/workqueue.h> ++#include <net/gso.h> + #include <uapi/linux/if_ether.h> + + static const unsigned char ovpn_keepalive_message[] = { +-- +2.41.0 + diff --git a/net-vpn/ovpn-dco/ovpn-dco-0.2.20230426.ebuild b/net-vpn/ovpn-dco/ovpn-dco-0.2.20230426.ebuild index b98d189c7b99..b5ed651bbd09 100644 --- a/net-vpn/ovpn-dco/ovpn-dco-0.2.20230426.ebuild +++ b/net-vpn/ovpn-dco/ovpn-dco-0.2.20230426.ebuild @@ -20,6 +20,10 @@ LICENSE="GPL-2" SLOT="0" IUSE="debug" +PATCHES=( + "${FILESDIR}"/0001-ovpn-dco-include-new-GSO-header-file.patch +) + pkg_setup() { CONFIG_CHECK=" INET
