0005-utils-fix-build-with-kernel-headers-4.14.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # HG changeset patch
  2. # User "Yann E. MORIN" <yann.morin.1998@free.fr>
  3. # Date 1511772629 -3600
  4. # Mon Nov 27 09:50:29 2017 +0100
  5. # Branch yem/fixes
  6. # Node ID 0848fa96c6eb13cf37249d317eff12cbd2f59ff7
  7. # Parent 3d43b280298c39a67d1d889e01e173f52c12da35
  8. utils: fix build with kernel headers >= 4.14
  9. In kernel 4.14, CA_SET_PID was removed, in commit 833ff5e7feda (media:
  10. ca.h: get rid of CA_SET_PID).
  11. Fix dst-util to not fail the build when this is missing.
  12. Fiuxes build failures such as:
  13. http://autobuild.buildroot.org/results/708/708f11809b2cafc2a3375dc515803c87b376ed4d/build-end.log
  14. http://autobuild.buildroot.org/results/e39/e3939d44376e92e8a35fb179d9890510334d8304/build-end.log
  15. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
  16. diff --git a/util/dst-utils/dst_test.c b/util/dst-utils/dst_test.c
  17. --- a/util/dst-utils/dst_test.c
  18. +++ b/util/dst-utils/dst_test.c
  19. @@ -111,6 +111,7 @@
  20. return 0;
  21. }
  22. +#if defined CA_SET_PID
  23. static int dst_set_pid(int cafd)
  24. {
  25. if ((ioctl(cafd, CA_SET_PID)) < 0) {
  26. @@ -120,6 +121,7 @@
  27. return 0;
  28. }
  29. +#endif
  30. static int dst_get_descr(int cafd)
  31. {
  32. @@ -230,8 +232,12 @@
  33. dst_reset(cafd);
  34. break;
  35. case 'p':
  36. +#if defined CA_SET_PID
  37. printf("%s: PID\n", __FUNCTION__);
  38. dst_set_pid(cafd);
  39. +#else
  40. + printf("%s: PID not supported\n", __FUNCTION__);
  41. +#endif
  42. break;
  43. case 'g':
  44. printf("%s: Get Desc\n", __FUNCTION__);