Commit 59e10f94 authored by Natanael Copa's avatar Natanael Copa

main/dahdi-linux-lts: fix build with 5.10 kernel

parent f9dbd4a5
......@@ -21,7 +21,7 @@ pkgrel=$(( $_krel + $_rel ))
pkgdesc="Digium Asterisk Hardware Device Interface drivers"
url="http://www.asterisk.org"
arch= #"x86_64"
arch="x86_64"
license="GPL-2.0-or-later"
depends="dahdi-linux $_kpkg=$_kpkgver"
# we need wget and tar because make install downloads firmware and uses fancy
......@@ -31,7 +31,6 @@ subpackages="$pkgname-dev"
source="http://downloads.digium.com/pub/telephony/dahdi-linux/releases/${_name}-$_ver.tar.gz
dahdi-depmod.patch
dahdi-bri_dchan.patch
kernel-compat-5.0.patch
kernel-compat-5.4.patch
kernel-5.6.patch
kernel-5.9.patch
......@@ -80,7 +79,6 @@ dev() {
sha512sums="440f5e44c933c609f2b3cfcf013c84bcd0c37929a43d69aac0276b11484cb890cd5939c5ac5950cad54d934d27ee6ff0b18f2bdd58477ed9be8055de107727b4 dahdi-linux-3.1.0.tar.gz
aba01eb90d9db1c595ff22078c76aadb20900486b5794d38b7ee61fa30d2fb51be318a4d059246017640447aee03fb09bb5514c818e3caa1cd98e331ec065173 dahdi-depmod.patch
fa2fa9e96eefc0f31a1a4a8f8f44e77936f6da0d7b74fe3c3d1f0de085621744ae4367932ac97a10b7f96b7d0954843b0bfe07a251b85434079cc6da29e243ba dahdi-bri_dchan.patch
342f2467aae3ef00440d613a0bb4e8bd06cd1df2d4c9878ba8cf4af0eaa5b9cd7455c14e10c66c462f29812560622187bfb12b35b7b6cb466475a365dd998f40 kernel-compat-5.0.patch
a03fde27c801bd7a9f5267505072a50dc738dcac9cafb08539bbd38eb78f3bb688f067bbbcbe05521a6f38fe28d4e8bfee68c30acea24647a4ea0d28a05bd987 kernel-compat-5.4.patch
136f49357761252cde233e664c1972beb140877ae46d8095364377eafcbe3ca908adcb6741881d9b0d0716a8525cda134e1db221f38b1ef3d39aea0b9c522b0d kernel-5.6.patch
2430f50caf6145c0fc3c318fb54968004939a5eb7a3e2d85e9a91a2a71b8408a16cecc63e8c741659b6974bad078d0ead540e5364729e29a62ba81c84638923a kernel-5.9.patch"
--- a/include/dahdi/kernel.h
+++ b/include/dahdi/kernel.h
@@ -1695,4 +1695,15 @@
#endif /* DAHDI_PRINK_MACROS_USE_debug */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0)
+static inline void do_gettimeofday(struct timeval *tv)
+{
+ struct timespec64 now;
+
+ ktime_get_real_ts64(&now);
+ tv->tv_sec = now.tv_sec;
+ tv->tv_usec = now.tv_nsec/1000;
+}
+#endif
+
#endif /* _DAHDI_KERNEL_H */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment