v1.5 branch refresh based upon upstream master @ c8677ca89e53e3be7988d54280fce166cc894a7e
[librecmc/librecmc.git] / target / linux / generic / hack-4.14 / 211-host_tools_portability.patch
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
6 Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 ---
8  tools/build/Build.include       | 2 +-
9  tools/perf/pmu-events/jevents.c | 1 +
10  tools/perf/pmu-events/json.c    | 1 -
11  3 files changed, 2 insertions(+), 2 deletions(-)
12
13 --- a/tools/build/Build.include
14 +++ b/tools/build/Build.include
15 @@ -97,4 +97,4 @@ cxx_flags = -Wp,-MD,$(depfile) -Wp,-MT,$
16  ###
17  ## HOSTCC C flags
18  
19 -host_c_flags = -Wp,-MD,$(depfile) -Wp,-MT,$@ $(CHOSTFLAGS) -D"BUILD_STR(s)=\#s" $(CHOSTFLAGS_$(basetarget).o) $(CHOSTFLAGS_$(obj))
20 +host_c_flags = -MD -MF $(depfile) -MT $@ $(CHOSTFLAGS) -D"BUILD_STR(s)=\#s" $(CHOSTFLAGS_$(basetarget).o) $(CHOSTFLAGS_$(obj))
21 --- a/tools/perf/pmu-events/jevents.c
22 +++ b/tools/perf/pmu-events/jevents.c
23 @@ -35,6 +35,7 @@
24  #include <stdlib.h>
25  #include <errno.h>
26  #include <string.h>
27 +#include <strings.h>
28  #include <ctype.h>
29  #include <unistd.h>
30  #include <stdarg.h>
31 --- a/tools/perf/pmu-events/json.c
32 +++ b/tools/perf/pmu-events/json.c
33 @@ -38,7 +38,6 @@
34  #include <unistd.h>
35  #include "jsmn.h"
36  #include "json.h"
37 -#include <linux/kernel.h>
38  
39  
40  static char *mapfile(const char *fn, size_t *size)