The ino64 commit to base was in OSVERSION 1200031, so fix the logic bug

and include this OSVERSION aswell ..

Submitted by:	antoine@
Pointyhat to:	kwm@
This commit is contained in:
Koop Mast 2017-05-27 16:55:42 +00:00
parent 5ba5319665
commit ac0288a04e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=441856

View file

@ -5,7 +5,7 @@
entry.type = GLIBTOP_FILE_TYPE_LOCALSOCKET; entry.type = GLIBTOP_FILE_TYPE_LOCALSOCKET;
+/* 64bit inodes */ +/* 64bit inodes */
+#if __FreeBSD_version > 1200031 +#if __FreeBSD_version >= 1200031
+ sun = (struct sockaddr_un *)&kif->kf_un.kf_sock.kf_sa_local; + sun = (struct sockaddr_un *)&kif->kf_un.kf_sock.kf_sa_local;
+#else +#else
sun = (struct sockaddr_un *)&kif->kf_sa_local; sun = (struct sockaddr_un *)&kif->kf_sa_local;
@ -14,7 +14,7 @@
if (sun->sun_path[0]) { if (sun->sun_path[0]) {
char *addrstr; char *addrstr;
+#if __FreeBSD_version > 1200031 +#if __FreeBSD_version >= 1200031
+ addrstr = addr_to_string(&kif->kf_un.kf_sock.kf_sa_local); + addrstr = addr_to_string(&kif->kf_un.kf_sock.kf_sa_local);
+#else +#else
addrstr = addr_to_string(&kif->kf_sa_local); addrstr = addr_to_string(&kif->kf_sa_local);
@ -26,7 +26,7 @@
} else { } else {
char *addrstr; char *addrstr;
+#if __FreeBSD_version > 1200031 +#if __FreeBSD_version >= 1200031
+ addrstr = addr_to_string(&kif->kf_un.kf_sock.kf_sa_peer); + addrstr = addr_to_string(&kif->kf_un.kf_sock.kf_sa_peer);
+#else +#else
addrstr = addr_to_string(&kif->kf_sa_peer); addrstr = addr_to_string(&kif->kf_sa_peer);
@ -38,7 +38,7 @@
entry.type = GLIBTOP_FILE_TYPE_INETSOCKET; entry.type = GLIBTOP_FILE_TYPE_INETSOCKET;
else else
entry.type = GLIBTOP_FILE_TYPE_INET6SOCKET; entry.type = GLIBTOP_FILE_TYPE_INET6SOCKET;
+#if __FreeBSD_version > 1200031 +#if __FreeBSD_version >= 1200031
+ addrstr = addr_to_string(&kif->kf_un.kf_sock.kf_sa_peer); + addrstr = addr_to_string(&kif->kf_un.kf_sock.kf_sa_peer);
+#else +#else
addrstr = addr_to_string(&kif->kf_sa_peer); addrstr = addr_to_string(&kif->kf_sa_peer);
@ -47,7 +47,7 @@
addrstr, addrstr,
sizeof(entry.info.sock.dest_host)); sizeof(entry.info.sock.dest_host));
g_free(addrstr); g_free(addrstr);
+#if __FreeBSD_version > 1200031 +#if __FreeBSD_version >= 1200031
+ entry.info.sock.dest_port = addr_to_port(&kif->kf_un.kf_sock.kf_sa_peer); + entry.info.sock.dest_port = addr_to_port(&kif->kf_un.kf_sock.kf_sa_peer);
+#else +#else
entry.info.sock.dest_port = addr_to_port(&kif->kf_sa_peer); entry.info.sock.dest_port = addr_to_port(&kif->kf_sa_peer);