0005-include-sys-sysmacros.h-for-major.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. From 435fbcee218b37a87368e2b22fa33366875d458c Mon Sep 17 00:00:00 2001
  2. From: Mike Frysinger <vapier@chromium.org>
  3. Date: Tue, 19 Apr 2016 13:58:49 -0400
  4. Subject: [PATCH] include sys/sysmacros.h for major()
  5. The major() func is defined in the sys/sysmacros.h header, so include it
  6. explicitly for the prototype. Upstream C libs are moving away from having
  7. sys/types.h include it all the time implicitly.
  8. BUG=None
  9. TEST=precq passes
  10. BRANCH=None
  11. Change-Id: I56b84138f08ded2376193403f9c9db22c5f24f71
  12. Reviewed-on: https://chromium-review.googlesource.com/339680
  13. Commit-Ready: Mike Frysinger <vapier@chromium.org>
  14. Tested-by: Mike Frysinger <vapier@chromium.org>
  15. Reviewed-by: Bill Richardson <wfrichar@google.com>
  16. Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
  17. ---
  18. cgpt/cgpt_wrapper.c | 1 +
  19. futility/dump_kernel_config_lib.c | 1 +
  20. 2 files changed, 2 insertions(+)
  21. diff --git a/cgpt/cgpt_wrapper.c b/cgpt/cgpt_wrapper.c
  22. index dcfaab9c..1716cdde 100644
  23. --- a/cgpt/cgpt_wrapper.c
  24. +++ b/cgpt/cgpt_wrapper.c
  25. @@ -18,6 +18,7 @@
  26. #include <stdio.h>
  27. #include <string.h>
  28. #include <sys/stat.h>
  29. +#include <sys/sysmacros.h>
  30. #include <sys/types.h>
  31. #include <unistd.h>
  32. diff --git a/futility/dump_kernel_config_lib.c b/futility/dump_kernel_config_lib.c
  33. index 4fe990c3..abf37ae1 100644
  34. --- a/futility/dump_kernel_config_lib.c
  35. +++ b/futility/dump_kernel_config_lib.c
  36. @@ -10,6 +10,7 @@
  37. #include <string.h>
  38. #include <sys/mman.h>
  39. #include <sys/stat.h>
  40. +#include <sys/sysmacros.h>
  41. #include <sys/types.h>
  42. #include <unistd.h>
  43. --
  44. 2.17.1