211-host_tools_portability.patch 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. From 7f698012384ccb1ed10cc758acfd085096fdb307 Mon Sep 17 00:00:00 2001
  2. From: Felix Fietkau <[email protected]>
  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 <[email protected]>
  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. diff --git a/tools/build/Build.include b/tools/build/Build.include
  12. index 1dcb95e76f70..9d6f97a7c1aa 100644
  13. --- a/tools/build/Build.include
  14. +++ b/tools/build/Build.include
  15. @@ -95,4 +95,4 @@ cxx_flags = -Wp,-MD,$(depfile),-MT,$@ $(CXXFLAGS) -D"BUILD_STR(s)=\#s" $(CXXFLAG
  16. ###
  17. ## HOSTCC C flags
  18. -host_c_flags = -Wp,-MD,$(depfile),-MT,$@ $(CHOSTFLAGS) -D"BUILD_STR(s)=\#s" $(CHOSTFLAGS_$(basetarget).o) $(CHOSTFLAGS_$(obj))
  19. +host_c_flags = -MD -MF $(depfile) -MT $@ $(CHOSTFLAGS) -D"BUILD_STR(s)=\#s" $(CHOSTFLAGS_$(basetarget).o) $(CHOSTFLAGS_$(obj))
  20. diff --git a/tools/perf/pmu-events/jevents.c b/tools/perf/pmu-events/jevents.c
  21. index 41611d7f9873..51333bee190c 100644
  22. --- a/tools/perf/pmu-events/jevents.c
  23. +++ b/tools/perf/pmu-events/jevents.c
  24. @@ -35,6 +35,7 @@
  25. #include <stdlib.h>
  26. #include <errno.h>
  27. #include <string.h>
  28. +#include <strings.h>
  29. #include <ctype.h>
  30. #include <unistd.h>
  31. #include <stdarg.h>
  32. diff --git a/tools/perf/pmu-events/json.c b/tools/perf/pmu-events/json.c
  33. index f67bbb0aa36e..a72c70a97fab 100644
  34. --- a/tools/perf/pmu-events/json.c
  35. +++ b/tools/perf/pmu-events/json.c
  36. @@ -38,7 +38,6 @@
  37. #include <unistd.h>
  38. #include "jsmn.h"
  39. #include "json.h"
  40. -#include <linux/kernel.h>
  41. static char *mapfile(const char *fn, size_t *size)
  42. --
  43. 2.11.0