211-host_tools_portability.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. From 7f698012384ccb1ed10cc758acfd085096fdb307 Mon Sep 17 00:00:00 2001
  2. From: Felix Fietkau <nbd@nbd.name>
  3. Date: Fri, 7 Jul 2017 17:02:03 +0200
  4. Subject: kernel: fix linux 4.9 host tools portability issues
  5. Signed-off-by: Felix Fietkau <nbd@nbd.name>
  6. ---
  7. tools/build/Build.include | 2 +-
  8. tools/perf/pmu-events/jevents.c | 1 +
  9. tools/perf/pmu-events/json.c | 1 -
  10. 3 files changed, 2 insertions(+), 2 deletions(-)
  11. --- a/tools/build/Build.include
  12. +++ b/tools/build/Build.include
  13. @@ -99,4 +99,4 @@ cxx_flags = -Wp,-MD,$(depfile) -Wp,-MT,$
  14. ###
  15. ## HOSTCC C flags
  16. -host_c_flags = -Wp,-MD,$(depfile) -Wp,-MT,$@ $(CHOSTFLAGS) -D"BUILD_STR(s)=\#s" $(CHOSTFLAGS_$(basetarget).o) $(CHOSTFLAGS_$(obj))
  17. +host_c_flags = -MD -MF $(depfile) -MT $@ $(CHOSTFLAGS) -D"BUILD_STR(s)=\#s" $(CHOSTFLAGS_$(basetarget).o) $(CHOSTFLAGS_$(obj))
  18. --- a/tools/perf/pmu-events/jevents.c
  19. +++ b/tools/perf/pmu-events/jevents.c
  20. @@ -35,6 +35,7 @@
  21. #include <stdlib.h>
  22. #include <errno.h>
  23. #include <string.h>
  24. +#include <strings.h>
  25. #include <ctype.h>
  26. #include <unistd.h>
  27. #include <stdarg.h>
  28. --- a/tools/perf/pmu-events/json.c
  29. +++ b/tools/perf/pmu-events/json.c
  30. @@ -38,7 +38,6 @@
  31. #include <unistd.h>
  32. #include "jsmn.h"
  33. #include "json.h"
  34. -#include <linux/kernel.h>
  35. static char *mapfile(const char *fn, size_t *size)