Advertisement
Guest User

Fix for https://aur.archlinux.org/packages/decklink on kernel >= 6.5.0

a guest
Sep 25th, 2023
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.01 KB | None | 0 0
  1. diff --git a/01-blackmagic-fix-build-kernel-6.5.patch b/01-blackmagic-fix-build-kernel-6.5.patch
  2. new file mode 100644
  3. index 0000000..f68d1bf
  4. --- /dev/null
  5. +++ b/01-blackmagic-fix-build-kernel-6.5.patch
  6. @@ -0,0 +1,16 @@
  7. +--- a/blackmagic-12.5a15/blackmagic_lib.c 2023-06-26 07:05:07.000000000 +0200
  8. ++++ b/blackmagic-12.5a15/blackmagic_lib.c 2023-09-25 11:32:47.032632972 +0200
  9. +@@ -676,7 +676,12 @@
  10. + #else
  11. + down_read(&current_task->mm->mmap_sem);
  12. + #endif
  13. +-#if KERNEL_VERSION_OR_LATER(5, 9, 0)
  14. ++#if KERNEL_VERSION_OR_LATER(6, 5, 0)
  15. ++ if (current_task == current)
  16. ++ ret = get_user_pages((unsigned long)ptr & PAGE_MASK, *nr_pages, write ? FOLL_WRITE : 0, pages);
  17. ++ else
  18. ++ ret = get_user_pages_remote(current_task->mm, (unsigned long)ptr & PAGE_MASK, *nr_pages, write ? FOLL_WRITE : 0, pages, NULL);
  19. ++#elif KERNEL_VERSION_OR_LATER(5, 9, 0)
  20. + if (current_task == current)
  21. + ret = get_user_pages((unsigned long)ptr & PAGE_MASK, *nr_pages, write ? FOLL_WRITE : 0, pages, NULL);
  22. + else
  23. diff --git a/PKGBUILD b/PKGBUILD
  24. index cfaa2b5..b137abf 100644
  25. --- a/PKGBUILD
  26. +++ b/PKGBUILD
  27. @@ -30,8 +30,10 @@ DLAGENTS=("https::/usr/bin/curl \
  28. )
  29.  
  30. source=("${_pkgsrc_file}"::"${_pkgsrc_url}"
  31. + "01-blackmagic-fix-build-kernel-6.5.patch"
  32. )
  33. -sha256sums=('f6e688123efd0deefaa01ecde6b4f630306a4ddcc9f33537433ea613c2a33dd1')
  34. +sha256sums=('f6e688123efd0deefaa01ecde6b4f630306a4ddcc9f33537433ea613c2a33dd1'
  35. + 'b60bb77740eefe2c519b073b8788e06cc90a8728429f2322329eb8a798886be6')
  36.  
  37. prepare() {
  38. cd $srcdir/Blackmagic_Desktop_Video_Linux_$pkgver/other/${_arch}
  39. @@ -40,11 +42,11 @@ prepare() {
  40.  
  41. cd desktopvideo-*/usr/src
  42.  
  43. - # for p in ${srcdir}/*.patch;
  44. - # do
  45. - # echo "Applying ${p}"
  46. - # patch --forward --strip=1 --input="${p}"
  47. - # done
  48. + for p in ${srcdir}/*.patch;
  49. + do
  50. + echo "Applying ${p}"
  51. + patch --forward --strip=1 --input="${p}"
  52. + done
  53.  
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement