linux-stable/tools
Arnaldo Carvalho de Melo 77f14a4955 perf tools: Add missing open_memstream() prototype for systems lacking it
[ Upstream commit d7a8c4a6a0 ]

There are systems such as the Android NDK API level 24 has the
open_memstream() function but doesn't provide a prototype, adding noise
to the build:

  builtin-timechart.c: In function 'cat_backtrace':
  builtin-timechart.c:486:2: warning: implicit declaration of function 'open_memstream' [-Wimplicit-function-declaration]
    FILE *f = open_memstream(&p, &p_len);
    ^
  builtin-timechart.c:486:2: warning: nested extern declaration of 'open_memstream' [-Wnested-externs]
  builtin-timechart.c:486:12: warning: initialization makes pointer from integer without a cast
    FILE *f = open_memstream(&p, &p_len);
              ^

Define a LACKS_OPEN_MEMSTREAM_PROTOTYPE define so that code needing that
can get a prototype.

Checked in the bionic git repo to be available since level 23:

https://android.googlesource.com/platform/bionic/+/master/libc/include/stdio.h#241

  FILE* open_memstream(char** __ptr, size_t* __size_ptr) __INTRODUCED_IN(23);

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-343ashae97e5bq6vizusyfno@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-01-26 09:32:41 +01:00
..
accounting
arch tools arch uapi: Sync the x86 kvm.h copy 2018-10-08 12:04:51 -03:00
bpf tools: bpftool: fix potential NULL pointer dereference in do_load 2018-12-17 09:24:34 +01:00
build Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2018-08-15 15:04:25 -07:00
cgroup
firewire
gpio
hv tools: hv: fcopy: set 'error' in case an unknown operation was requested 2018-09-30 08:49:55 -07:00
iio iio: Add modifier for DUV light 2018-07-23 19:18:10 +01:00
include x86/speculation: Add prctl() control for indirect branch speculation 2018-12-05 19:32:04 +01:00
kvm/kvm_stat tools/kvm_stat: cut down decimal places in update interval dialog 2018-10-01 15:40:59 +02:00
laptop
leds
lib tools lib subcmd: Don't add the kernel sources to the include path 2019-01-26 09:32:41 +01:00
memory-model tools/memory-model: Rename litmus tests to comply to norm7 2018-07-17 09:30:36 +02:00
nfsd
objtool objtool: Fix segfault in .cold detection with -ffunction-sections 2018-12-17 09:24:33 +01:00
pci tools: PCI: Add MSI-X support 2018-07-19 11:47:13 +01:00
pcmcia
perf perf tools: Add missing open_memstream() prototype for systems lacking it 2019-01-26 09:32:41 +01:00
power tools/power/cpupower: fix compilation with STATIC=true 2018-12-01 09:37:27 +01:00
scripts
spi
testing bpf: relax verifier restriction on BPF_MOV | BPF_ALU 2019-01-26 09:32:39 +01:00
thermal/tmon
time
usb tools: usb: ffs-test: Fix build on big endian systems 2018-07-17 10:12:51 +03:00
virtio virtio: fix test build after uio.h change 2019-01-13 09:51:03 +01:00
vm tools/vm/page-types.c: fix "defined but not used" warning 2018-09-04 16:45:02 -07:00
wmi
Makefile