0001-include-sys-sysmacros.h-for-major-minor-definitions.patch 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. From 7f4f379f8343c0ce92aa30f3f9037288a089a902 Mon Sep 17 00:00:00 2001
  2. From: Khem Raj <raj.khem@gmail.com>
  3. Date: Sun, 18 Dec 2016 08:24:56 +0000
  4. Subject: [PATCH] include <sys/sysmacros.h> for major/minor definitions
  5. glibc 2.25 will error out if the applications are expecting
  6. this to come from sys/types.h, it is being removed from
  7. there.
  8. Fixes
  9. error: In the GNU C Library, "minor" is defined
  10. | by <sys/sysmacros.h>. For historical compatibility, it is
  11. | currently defined by <sys/types.h> as well, but we plan to
  12. | remove this soon. To use "minor", include <sys/sysmacros.h>
  13. | directly. If you did not intend to use a system-defined macro
  14. | "minor", you should undefine it after including <sys/types.h>. [-Werror]
  15. | ul_oct ((u_long) MINOR (arcn->sb.st_rdev), hd->devminor,
  16. | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  17. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  18. ---
  19. Upstream-Status: Pending
  20. src/cpio.c | 2 +-
  21. src/gen_subs.c | 2 +-
  22. src/tar.c | 2 +-
  23. 3 files changed, 3 insertions(+), 3 deletions(-)
  24. Index: pax-3.4/src/cpio.c
  25. ===================================================================
  26. --- pax-3.4.orig/src/cpio.c
  27. +++ pax-3.4/src/cpio.c
  28. @@ -36,6 +36,7 @@
  29. #include "config.h"
  30. #endif
  31. +#include <sys/sysmacros.h>
  32. #include <sys/types.h>
  33. #include <sys/time.h>
  34. #include <sys/stat.h>
  35. Index: pax-3.4/src/gen_subs.c
  36. ===================================================================
  37. --- pax-3.4.orig/src/gen_subs.c
  38. +++ pax-3.4/src/gen_subs.c
  39. @@ -37,6 +37,7 @@
  40. #include "config.h"
  41. #endif
  42. +#include <sys/sysmacros.h>
  43. #include <sys/types.h>
  44. #include <sys/time.h>
  45. #include <sys/stat.h>
  46. Index: pax-3.4/src/tar.c
  47. ===================================================================
  48. --- pax-3.4.orig/src/tar.c
  49. +++ pax-3.4/src/tar.c
  50. @@ -37,6 +37,7 @@
  51. #include "config.h"
  52. #endif
  53. +#include <sys/sysmacros.h>
  54. #include <sys/types.h>
  55. #include <sys/time.h>
  56. #include <sys/stat.h>