mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 16:10:54 +00:00
Really make it compile on older kernels
This commit is contained in:
@ -144,6 +144,10 @@ sysprof_perf_counter_open (struct perf_counter_attr *attr,
|
|||||||
int group_fd,
|
int group_fd,
|
||||||
unsigned long flags)
|
unsigned long flags)
|
||||||
{
|
{
|
||||||
|
#ifndef __NR_perf_counter_open
|
||||||
|
#define __NR_perf_counter_open 336
|
||||||
|
#endif
|
||||||
|
|
||||||
attr->size = sizeof(*attr);
|
attr->size = sizeof(*attr);
|
||||||
|
|
||||||
return syscall (__NR_perf_counter_open, attr, pid, cpu, group_fd, flags);
|
return syscall (__NR_perf_counter_open, attr, pid, cpu, group_fd, flags);
|
||||||
@ -271,7 +275,6 @@ on_read (gpointer data)
|
|||||||
/* FIXME: return proper errors */
|
/* FIXME: return proper errors */
|
||||||
#define fail(x) \
|
#define fail(x) \
|
||||||
do { \
|
do { \
|
||||||
g_printerr ("the fail is "); \
|
|
||||||
perror (x); \
|
perror (x); \
|
||||||
exit (-1); \
|
exit (-1); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|||||||
Reference in New Issue
Block a user