trinity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] compat.h: Add CLOCK_BOOTTIME.
@ 2015-05-20 21:15 Vinson Lee
  0 siblings, 0 replies; only message in thread
From: Vinson Lee @ 2015-05-20 21:15 UTC (permalink / raw
  To: trinity; +Cc: Vinson Lee

From: Vinson Lee <vlee@twitter.com>

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@twitter.com>
---
 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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-05-20 21:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-20 21:15 [PATCH] compat.h: Add CLOCK_BOOTTIME Vinson Lee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).