# nothing to be placed to debuginfo package
%define _enable_debug_packages 0
-%define rel 7
+%define rel 8
%define pname dahdi-linux
%define FIRMWARE_URL http://downloads.digium.com/pub/telephony/firmware/releases
Summary: DAHDI telephony device support
Patch4: kernel-5.9.patch
Patch5: kernel-4.9.256.patch
Patch6: nostdinc.patch
+Patch7: kernel-5.17.patch
URL: http://www.asterisk.org/
%{?with_kernel:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}}
BuildRequires: perl-base
%patch4 -p1
%patch5 -p1
%patch6 -p1
+%patch7 -p1
for a in %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7}; do
ln -s $a drivers/dahdi/firmware
--- /dev/null
+--- dahdi-linux-3.1.0/include/dahdi/kernel.h~ 2022-04-02 22:49:13.000000000 +0200
++++ dahdi-linux-3.1.0/include/dahdi/kernel.h 2022-04-02 23:08:10.095243044 +0200
+@@ -1504,6 +1504,10 @@
+
+ #endif /* 4.15.0 */
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0)
++#define PDE_DATA pde_data
++#endif
++
+ #ifndef dahdi_ktime_equal
+ static inline int dahdi_ktime_equal(const ktime_t cmp1, const ktime_t cmp2)
+ {