0005-libv4lconvert-fix-compiler-warning.patch 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. From 380fe7d4548a99bfcfc1594b6f0b3dd2369978f1 Mon Sep 17 00:00:00 2001
  2. From: Hans Verkuil <hans.verkuil@cisco.com>
  3. Date: Sun, 1 Apr 2018 12:10:33 +0200
  4. Subject: [PATCH] libv4lconvert: fix compiler warning
  5. CC control/libv4lconvert_la-libv4lcontrol.lo
  6. control/libv4lcontrol.c: In function ‘v4lcontrol_get_usb_info’:
  7. control/libv4lcontrol.c:391:13: warning: In the GNU C Library, "minor" is defined
  8. by <sys/sysmacros.h>. For historical compatibility, it is
  9. currently defined by <sys/types.h> as well, but we plan to
  10. remove this soon. To use "minor", include <sys/sysmacros.h>
  11. directly. If you did not intend to use a system-defined macro
  12. "minor", you should undefine it after including <sys/types.h>.
  13. c == '\n' && minor_dev == minor(st.st_rdev))
  14. ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  15. Dropped the '#if defined(MAJOR_IN_SYSMACROS)' to ensure that sysmacros.h
  16. is always included. It seems that #if is no longer needed. At least,
  17. nobody complained when I removed it in other places earlier :-)
  18. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
  19. Signed-off-by: Baruch Siach <baruch@tkos.co.il>
  20. ---
  21. Upstream status: commit 380fe7d4548a9
  22. lib/libv4lconvert/control/libv4lcontrol.c | 2 --
  23. 1 file changed, 2 deletions(-)
  24. diff --git a/lib/libv4lconvert/control/libv4lcontrol.c b/lib/libv4lconvert/control/libv4lcontrol.c
  25. index 1e784eda8a92..59f28b137b98 100644
  26. --- a/lib/libv4lconvert/control/libv4lcontrol.c
  27. +++ b/lib/libv4lconvert/control/libv4lcontrol.c
  28. @@ -20,9 +20,7 @@
  29. */
  30. #include <sys/types.h>
  31. -#if defined(MAJOR_IN_SYSMACROS)
  32. #include <sys/sysmacros.h>
  33. -#endif
  34. #include <sys/mman.h>
  35. #include <fcntl.h>
  36. #include <sys/stat.h>
  37. --
  38. 2.18.0