perf trace: Add getrandom beautifier related defines for older systems

Were the detached tarball (make perf-tar-src-pkg) build was failing because
those definitions aren't available in the system headers.

On RHEL7, for instance:

  builtin-trace.c: In function ‘syscall_arg__scnprintf_getrandom_flags’:
  builtin-trace.c:1113:14: error: ‘GRND_RANDOM’ undeclared (first use in this function)
    P_FLAG(RANDOM);
                ^
  builtin-trace.c:1114:14: error: ‘GRND_NONBLOCK’ undeclared (first use in this function)
    P_FLAG(NONBLOCK);
              ^

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Milian Wolff <milian.wolff@kdab.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-r8496g24a3kbqynvk6617b0e@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 6fb35b95
......@@ -1110,6 +1110,13 @@ static size_t syscall_arg__scnprintf_seccomp_flags(char *bf, size_t size,
#define SCA_SECCOMP_FLAGS syscall_arg__scnprintf_seccomp_flags
#ifndef GRND_NONBLOCK
#define GRND_NONBLOCK 0x0001
#endif
#ifndef GRND_RANDOM
#define GRND_RANDOM 0x0002
#endif
static size_t syscall_arg__scnprintf_getrandom_flags(char *bf, size_t size,
struct syscall_arg *arg)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment