Index: devel/libgtop/files/patch-sysdeps_freebsd_procmap.c =================================================================== --- devel/libgtop/files/patch-sysdeps_freebsd_procmap.c +++ devel/libgtop/files/patch-sysdeps_freebsd_procmap.c @@ -1,15 +1,26 @@ ---- sysdeps/freebsd/procmap.c.orig 2017-08-07 22:43:41 UTC +--- sysdeps/freebsd/procmap.c.orig 2019-02-04 20:15:22 UTC +++ sysdeps/freebsd/procmap.c -@@ -52,6 +52,8 @@ +@@ -51,12 +51,19 @@ + #define _KERNEL #include #include ++#if (__FreeBSD_version < 1300115) #include ++#endif /* __FreeBSD_version < 1300115 */ +#include +#include #include #if (__FreeBSD_version >= 600006) || defined(__FreeBSD_kernel__) #include -@@ -95,12 +97,14 @@ _glibtop_sysdeps_freebsd_dev_inode (glibtop *server, s + #endif + #undef _KERNEL ++#if (__FreeBSD_version >= 1300115) ++#include ++#endif + + + #if (__FreeBSD_version >= 1101001) +@@ -95,12 +102,14 @@ _glibtop_sysdeps_freebsd_dev_inode (glibtop *server, s struct cdev_priv priv; #if __FreeBSD_version < 800039 struct cdev si; @@ -25,7 +36,7 @@ (char *) &tagptr, sizeof (tagptr)) != sizeof (tagptr) || kvm_read (server->machine->kd, (gulong) tagptr, (char *) tagstr, sizeof (tagstr)) != sizeof (tagstr)) -@@ -231,6 +235,32 @@ _glibtop_init_proc_map_p (glibtop *server) +@@ -231,6 +240,32 @@ _glibtop_init_proc_map_p (glibtop *server) server->sysdeps.proc_map = _glibtop_sysdeps_proc_map; } @@ -58,7 +69,7 @@ /* Provides detailed information about a process. */ glibtop_map_entry * -@@ -238,13 +268,12 @@ glibtop_get_proc_map_p (glibtop *server, glibtop_proc_ +@@ -238,13 +273,12 @@ glibtop_get_proc_map_p (glibtop *server, glibtop_proc_ pid_t pid) { struct kinfo_proc *pinfo; @@ -74,7 +85,7 @@ memset (buf, 0, sizeof (glibtop_proc_map)); -@@ -273,16 +302,6 @@ glibtop_get_proc_map_p (glibtop *server, glibtop_proc_ +@@ -273,16 +307,6 @@ glibtop_get_proc_map_p (glibtop *server, glibtop_proc_ return NULL; } @@ -91,7 +102,7 @@ /* Walk through the `vm_map_entry' list ... */ /* I tested this a few times with `mmap'; as soon as you write -@@ -292,21 +311,17 @@ glibtop_get_proc_map_p (glibtop *server, glibtop_proc_ +@@ -292,21 +316,17 @@ glibtop_get_proc_map_p (glibtop *server, glibtop_proc_ maps = g_array_sized_new(FALSE, FALSE, sizeof(glibtop_map_entry), vmspace.vm_map.nentries); @@ -120,7 +131,7 @@ if (entry.eflags & (MAP_ENTRY_IS_SUB_MAP)) continue; -@@ -377,7 +392,7 @@ glibtop_get_proc_map_p (glibtop *server, glibtop_proc_ +@@ -377,7 +397,7 @@ glibtop_get_proc_map_p (glibtop *server, glibtop_proc_ if (entry.protection & VM_PROT_EXECUTE) mentry->perm |= GLIBTOP_MAP_PERM_EXECUTE;