]> git.pld-linux.org Git - packages/WireGuard.git/commitdiff
- up to 1.0.20210124 auto/th/WireGuard-1.0.20210124-1
authorJan Rękorajski <baggins@pld-linux.org>
Sat, 6 Feb 2021 22:08:55 +0000 (23:08 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Sat, 6 Feb 2021 22:08:55 +0000 (23:08 +0100)
- fix building with kernel 4.9.256

WireGuard.spec
kernel-4.9.256.patch [new file with mode: 0644]

index 9c6456133e5b33d8816d166729c389282d875be5..fcfd16dddf28e3b8b869148436a5757a64106698 100644 (file)
@@ -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 (file)
index 0000000..bb144f3
--- /dev/null
@@ -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
This page took 0.15136 seconds and 4 git commands to generate.