summaryrefslogtreecommitdiff
path: root/sysutils/lsof/files/patch-dialects-freebsd-dlsof.h
blob: ec64911fbfb3bcc819371746936252e9e8a5df5b (plain) (blame)
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
--- dialects/freebsd/dlsof.h.orig	2019-05-08 07:32:25 UTC
+++ dialects/freebsd/dlsof.h
@@ -38,6 +38,7 @@
 #if	!defined(FREEBSD_LSOF_H)
 #define	FREEBSD_LSOF_H	1
 
+#include <stddef.h>
 #include <stdlib.h>
 #include <dirent.h>
 #include <nlist.h>
@@ -45,6 +46,12 @@
 #include <signal.h>
 #include <unistd.h>
 
+#if    FREEBSDV>=13000
+/* This header is a huge mess.  Please don't support EOL FreeBSD releases. */
+#define        _KERNEL 1
+#include <sys/_lock.h>
+#undef _KERNEL
+#endif         /* FREEBSDV>=13000 */
 # if	FREEBSDV>=4000
 #  if	FREEBSDV>=5000
 #   if	FREEBSDV<6020
@@ -104,6 +111,12 @@ typedef	struct device	*device_t;
 
 
 #include <sys/conf.h>
+
+/* 
+ * include <stdbool.h> for refcount(9)
+ */
+#include <stdbool.h>
+ 
 
 #  if	defined(HAS_VM_MEMATTR_T)
 #undef	vm_memattr_t