From: Arnaldo Carvalho de Melo Date: Tue, 5 Jul 2016 17:43:27 +0000 (-0300) Subject: perf tests openat-syscall-tp-fields: Add some conditional defines X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ab6526b2ca2c2c3b383a24b2a0c68c5a8f71b820;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git perf tests openat-syscall-tp-fields: Add some conditional defines These were only defined if _GNU_SOURCE was set in older glibc versions, check that and provide the defines in such cases. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-b8esouhpg4tk6vi4n3d7ipch@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/tests/openat-syscall-tp-fields.c b/tools/perf/tests/openat-syscall-tp-fields.c index 942dbf43d7c7..f52239fed361 100644 --- a/tools/perf/tests/openat-syscall-tp-fields.c +++ b/tools/perf/tests/openat-syscall-tp-fields.c @@ -6,6 +6,13 @@ #include "tests.h" #include "debug.h" +#ifndef O_DIRECTORY +#define O_DIRECTORY 00200000 +#endif +#ifndef AT_FDCWD +#define AT_FDCWD -100 +#endif + int test__syscall_openat_tp_fields(int subtest __maybe_unused) { struct record_opts opts = {