1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
diff --git a/buildrump.sh/src/lib/librumpuser/rumpuser_dl.c b/buildrump.sh/src/lib/librumpuser/rumpuser_dl.c
index 5d3a1c438..6ce2ff35e 100644
--- a/buildrump.sh/src/lib/librumpuser/rumpuser_dl.c
+++ b/buildrump.sh/src/lib/librumpuser/rumpuser_dl.c
@@ -45,7 +45,9 @@ __RCSID("$NetBSD: rumpuser_dl.c,v 1.33 2020/03/22 13:30:10 pgoyette Exp $");
#include <sys/types.h>
#include <sys/time.h>
+#if defined(HAVE_SYS_EVCNT)
#include <sys/evcnt.h>
+#endif
#include <assert.h>
@@ -384,6 +386,7 @@ process_object(void *handle,
assert(sfp == sfp_end);
}
+#if defined(HAVE_SYS_EVCNT)
/* handle link_set_evcnts */
evp = dlsym(handle, "__start_link_set_evcnts");
evp_end = dlsym(handle, "__stop_link_set_evcnts");
@@ -392,6 +395,7 @@ process_object(void *handle,
doevcntattach(*evp);
assert(evp == evp_end);
}
+#endif
}
/*
diff --git a/buildrump.sh/src/lib/librumpuser/rumpuser_config.h.in b/buildrump.sh/src/lib/librumpuser/rumpuser_config.h.in
index b008c0621..f4c9615d5 100644
--- a/buildrump.sh/src/lib/librumpuser/rumpuser_config.h.in
+++ b/buildrump.sh/src/lib/librumpuser/rumpuser_config.h.in
@@ -102,6 +102,9 @@
/* Define to 1 if you have the <sys/dkio.h> header file. */
#undef HAVE_SYS_DKIO_H
+/* Define to 1 if you have the <sys/evcnt.h> header file. */
+#undef HAVE_SYS_EVCNT_H
+
/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
diff --git a/buildrump.sh/src/lib/librumpuser/rumpuser_port.h b/buildrump.sh/src/lib/librumpuser/rumpuser_port.h
index 5c5cc8f83..fa4ed2e55 100644
--- a/buildrump.sh/src/lib/librumpuser/rumpuser_port.h
+++ b/buildrump.sh/src/lib/librumpuser/rumpuser_port.h
@@ -41,6 +41,7 @@
#define HAVE_SYS_DISKLABEL_H 1
#define HAVE_SYS_DISK_H 1
#define HAVE_SYS_DKIO_H 1
+#define HAVE_SYS_EVCNT_H 1
#define HAVE_SYS_PARAM_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_SYSCTL_H 1
|