[sysprof] Really make it compile on older kernels
- From: Søren Sandmann Pedersen <ssp src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [sysprof] Really make it compile on older kernels
- Date: Fri, 25 Sep 2009 15:50:50 +0000 (UTC)
commit 79107145c020b27da77b83d9349386ebb0cce7f6
Author: Søren Sandmann Pedersen <sandmann daimi au dk>
Date: Fri Sep 25 11:50:08 2009 -0400
Really make it compile on older kernels
collector.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/collector.c b/collector.c
index edef9f9..7128920 100644
--- a/collector.c
+++ b/collector.c
@@ -144,6 +144,10 @@ sysprof_perf_counter_open (struct perf_counter_attr *attr,
int group_fd,
unsigned long flags)
{
+#ifndef __NR_perf_counter_open
+#define __NR_perf_counter_open 336
+#endif
+
attr->size = sizeof(*attr);
return syscall (__NR_perf_counter_open, attr, pid, cpu, group_fd, flags);
@@ -271,7 +275,6 @@ on_read (gpointer data)
/* FIXME: return proper errors */
#define fail(x) \
do { \
- g_printerr ("the fail is "); \
perror (x); \
exit (-1); \
} while (0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]