$OpenBSD: patch-ECtools_mapitime_cpp,v 1.8 2020/03/08 08:17:57 robert Exp $

Index: ECtools/mapitime.cpp
--- ECtools/mapitime.cpp.orig
+++ ECtools/mapitime.cpp
@@ -33,6 +33,17 @@ using namespace KC;
 using clk = std::chrono::steady_clock;
 using duration = decltype(time_point()-time_point());
 
+#if defined(__OpenBSD__)
+#define SIGEV_SIGNAL 1
+struct sigevent /* dummy */
+{
+	int sigev_notify;
+	int sigev_signo;
+};
+#define timer_create(clockid, sevp, timerp) ((void) (clockid), (void) (sevp), (void) (timerp), errno = ENOSYS, -1)
+#define timer_settime(timer, flags, value, ovalue) ((void) (timer), (void) (flags), (void) (value), (void) (ovalue), errno = ENOSYS, -1)
+#endif
+
 struct mpt_stat_entry {
 	duration delta;
 };
@@ -488,6 +499,8 @@ static int mpt_main_pagetime(int argc, char **argv)
 
 static int mpt_main_exectime(int argc, char **argv)
 {
+	extern char **environ;
+
 	if (argc < 2) {
 		fprintf(stderr, "Need program to test\n");
 		return EXIT_FAILURE;
