[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Vinson Lee <vlee@xxxxxxxxxxx>

CLOCK_BOOTTIME is not available with glibc < 2.14.

Fix build on CentOS 6.

  CC	syscalls/perf_event_open.o
syscalls/perf_event_open.c: In function ‘create_mostly_valid_sampling_event’:
syscalls/perf_event_open.c:1118: error: ‘CLOCK_BOOTTIME’ undeclared (first use in this function)
syscalls/perf_event_open.c:1118: error: (Each undeclared identifier is reported only once
syscalls/perf_event_open.c:1118: error: for each function it appears in.)

Signed-off-by: Vinson Lee <vlee@xxxxxxxxxxx>
---
 include/compat.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/include/compat.h b/include/compat.h
index c0c7f0a..0e3d011 100644
--- a/include/compat.h
+++ b/include/compat.h
@@ -997,3 +997,8 @@ struct kvm_get_htab_fd {
 #ifndef EPOLLWAKEUP
 #define EPOLLWAKEUP (1u << 29)
 #endif
+
+/* time.h */
+#ifndef CLOCK_BOOTTIME
+#define CLOCK_BOOTTIME 7
+#endif
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe trinity" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SCSI]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux