Skip to contentSkip to conversation

compat.h: Add CLOCK_BOOTTIME.

PATCH New Vinson Lee 1 participant 1 message May 20, 2015

lore
Share & tools
lore

Vinson Lee

author
#0 lore raw

PATCH 1/1 compat.h: Add CLOCK_BOOTTIME.

From: Vinson Lee <[email protected]>

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.)

---
 include/compat.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
include/compat.h +5 -0
index c0c7f0a..0e3d011 100644
@@ -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
Signature · 1 line
1.7.1