commit f773a8ff8edd46668e0c31f7b1f4f779b2e8eca6
Author: Jan RÄ™korajski <[email protected]>
Date:   Sat Feb 6 23:08:55 2021 +0100

    - up to 1.0.20210124
    - fix building with kernel 4.9.256

 WireGuard.spec       |  6 ++++--
 kernel-4.9.256.patch | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 60 insertions(+), 2 deletions(-)
---
diff --git a/WireGuard.spec b/WireGuard.spec
index 9c64561..fcfd16d 100644
--- a/WireGuard.spec
+++ b/WireGuard.spec
@@ -4,12 +4,13 @@
 %define                rel     1
 Summary:       WireGuard is an extremely simple yet fast and modern VPN that 
utilizes state-of-the-art cryptography
 Name:          WireGuard%{_alt_kernel}
-Version:       1.0.20201112
+Version:       1.0.20210124
 Release:       %{rel}@%{_kernel_ver_str}
 License:       GPL v2
 Group:         Networking/Daemons
 Source0:       
https://git.zx2c4.com/wireguard-linux-compat/snapshot/wireguard-linux-compat-%{version}.tar.xz
-# Source0-md5: 3a2ac2fc1168a114c63f351d6c78d944
+# Source0-md5: 45fe2a797dd57ff529f5f09d0754cef8
+Patch0:                kernel-4.9.256.patch
 URL:           https://www.wireguard.com/
 %{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:3.10}
 BuildRequires: rpmbuild(macros) >= 1.701
@@ -55,6 +56,7 @@ WireGuard kernel module.\
 
 %prep
 %setup -q -n wireguard-linux-compat-%{version}
+%patch0 -p1
 
 %build
 %{expand:%build_kernel_packages}
diff --git a/kernel-4.9.256.patch b/kernel-4.9.256.patch
new file mode 100644
index 0000000..bb144f3
--- /dev/null
+++ b/kernel-4.9.256.patch
@@ -0,0 +1,56 @@
+--- wireguard-linux-compat-1.0.20210124/src/compat/compat.h~   2021-01-24 
14:45:29.000000000 +0100
++++ wireguard-linux-compat-1.0.20210124/src/compat/compat.h    2021-02-06 
23:07:40.593824415 +0100
+@@ -91,7 +91,7 @@
+ 
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0) && LINUX_VERSION_CODE >= 
KERNEL_VERSION(3, 16, 83)
+ #define ipv6_dst_lookup_flow(a, b, c, d) ipv6_dst_lookup_flow(b, c, d)
+-#elif (LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 5) && LINUX_VERSION_CODE >= 
KERNEL_VERSION(5, 4, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(5, 3, 18) && 
LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0) && !defined(ISUBUNTU1904)) || 
(!defined(ISRHEL8) && !defined(ISDEBIAN) && !defined(ISUBUNTU1804) && 
LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 119) && LINUX_VERSION_CODE >= 
KERNEL_VERSION(4, 15, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 181) 
&& LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)) || (LINUX_VERSION_CODE < 
KERNEL_VERSION(4, 9, 224) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)) || 
(LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 224) && !defined(ISUBUNTU1604) && 
!defined(ISRHEL7))
++#elif (LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 5) && LINUX_VERSION_CODE >= 
KERNEL_VERSION(5, 4, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(5, 3, 18) && 
LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0) && !defined(ISUBUNTU1904)) || 
(!defined(ISRHEL8) && !defined(ISDEBIAN) && !defined(ISUBUNTU1804) && 
LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 119) && LINUX_VERSION_CODE >= 
KERNEL_VERSION(4, 15, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 181) 
&& LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)) || (LINUX_VERSION_CODE < 
KERNEL_VERSION(4, 9, 224) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)) || 
(LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 224) && !defined(ISUBUNTU1604) && 
!defined(ISRHEL7))
+ #define ipv6_dst_lookup_flow(a, b, c, d) ipv6_dst_lookup(a, b, &dst, c) + 
(void *)0 ?: dst
+ #endif
+ 
+@@ -531,7 +531,7 @@
+ #define nla_parse_nested(a, b, c, d, e) nla_parse_nested(a, b, c, d)
+ #endif
+ 
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) && !defined(ISRHEL7)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0) && !defined(ISRHEL7)
+ static inline struct nlattr **genl_family_attrbuf(const struct genl_family 
*family)
+ {
+       return family->attrbuf;
+@@ -554,7 +554,7 @@
+ #endif
+ #endif
+ 
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) && !defined(ISRHEL7)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0) && !defined(ISRHEL7)
+ #include <net/genetlink.h>
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
+ #define genl_register_family(a) genl_register_family_with_ops(a, genl_ops, 
ARRAY_SIZE(genl_ops))
+@@ -565,7 +565,7 @@
+ #define COMPAT_CANNOT_USE_GENL_NOPS
+ #endif
+ 
+-#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 2) && LINUX_VERSION_CODE >= 
KERNEL_VERSION(4, 14, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 16) && 
LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)) || (LINUX_VERSION_CODE < 
KERNEL_VERSION(4, 9, 65) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)) || 
(LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 101) && LINUX_VERSION_CODE >= 
KERNEL_VERSION(3, 19, 0)) || LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 84)
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 2) && LINUX_VERSION_CODE >= 
KERNEL_VERSION(4, 14, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 16) && 
LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)) || (LINUX_VERSION_CODE < 
KERNEL_VERSION(4, 9, 65) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)) || 
(LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 101) && LINUX_VERSION_CODE >= 
KERNEL_VERSION(3, 19, 0)) || LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 84)
+ #define __COMPAT_NETLINK_DUMP_BLOCK { \
+       int ret; \
+       skb->end -= nlmsg_total_size(sizeof(int)); \
+@@ -577,7 +577,7 @@
+ #else
+ #define __COMPAT_NETLINK_DUMP_BLOCK return wg_get_device_dump_real(skb, cb);
+ #endif
+-#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 8) && LINUX_VERSION_CODE >= 
KERNEL_VERSION(4, 15, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 25) && 
LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)) || LINUX_VERSION_CODE < 
KERNEL_VERSION(4, 9, 87)
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 8) && LINUX_VERSION_CODE >= 
KERNEL_VERSION(4, 15, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 25) && 
LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)) || LINUX_VERSION_CODE < 
KERNEL_VERSION(4, 9, 87)
+ #define wg_get_device_dump(a, b) wg_get_device_dump_real(a, b); \
+ static int wg_get_device_dump(a, b) { \
+       struct wg_device *wg = (struct wg_device *)cb->args[0]; \
+@@ -1008,7 +1008,7 @@
+ #define icmpv6_ndo_send __compat_icmpv6_ndo_send
+ #endif
+ 
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
+ #define COMPAT_CANNOT_USE_MAX_MTU
+ #endif
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/WireGuard.git/commitdiff/f773a8ff8edd46668e0c31f7b1f4f779b2e8eca6

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to