Index: sysutils/py-psutil/Makefile =================================================================== --- sysutils/py-psutil/Makefile +++ sysutils/py-psutil/Makefile @@ -19,7 +19,12 @@ USE_PYTHON= autoplist concurrent distutils USES= python +.include +.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1200031 +EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-ino64 +.endif + post-install: ${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/psutil/_psutil_bsd.so ${STAGEDIR}${PYTHON_SITELIBDIR}/psutil/_psutil_posix.so -.include +.include Index: sysutils/py-psutil/files/extra-patch-ino64 =================================================================== --- sysutils/py-psutil/files/extra-patch-ino64 +++ sysutils/py-psutil/files/extra-patch-ino64 @@ -0,0 +1,60 @@ +--- psutil/arch/bsd/freebsd_socks.c.orig 2017-04-22 17:20:07.041427000 +0000 ++++ psutil/arch/bsd/freebsd_socks.c 2017-04-22 17:22:50.547756000 +0000 +@@ -148,20 +148,20 @@ + if (kif->kf_sock_domain == AF_INET) { + if (!psutil_sockaddr_matches( + AF_INET, inp->inp_lport, &inp->inp_laddr, +- &kif->kf_sa_local)) ++ &kif->kf_un.kf_sock.kf_sa_local)) + continue; + if (!psutil_sockaddr_matches( + AF_INET, inp->inp_fport, &inp->inp_faddr, +- &kif->kf_sa_peer)) ++ &kif->kf_un.kf_sock.kf_sa_peer)) + continue; + } else { + if (!psutil_sockaddr_matches( + AF_INET6, inp->inp_lport, &inp->in6p_laddr, +- &kif->kf_sa_local)) ++ &kif->kf_un.kf_sock.kf_sa_local)) + continue; + if (!psutil_sockaddr_matches( + AF_INET6, inp->inp_fport, &inp->in6p_faddr, +- &kif->kf_sa_peer)) ++ &kif->kf_un.kf_sock.kf_sa_peer)) + continue; + } + +@@ -577,19 +577,19 @@ + inet_ntop( + kif->kf_sock_domain, + psutil_sockaddr_addr(kif->kf_sock_domain, +- &kif->kf_sa_local), ++ &kif->kf_un.kf_sock.kf_sa_local), + lip, + sizeof(lip)); + inet_ntop( + kif->kf_sock_domain, + psutil_sockaddr_addr(kif->kf_sock_domain, +- &kif->kf_sa_peer), ++ &kif->kf_un.kf_sock.kf_sa_peer), + rip, + sizeof(rip)); + lport = htons(psutil_sockaddr_port(kif->kf_sock_domain, +- &kif->kf_sa_local)); ++ &kif->kf_un.kf_sock.kf_sa_local)); + rport = htons(psutil_sockaddr_port(kif->kf_sock_domain, +- &kif->kf_sa_peer)); ++ &kif->kf_un.kf_sock.kf_sa_peer)); + + // construct python tuple/list + py_laddr = Py_BuildValue("(si)", lip, lport); +@@ -620,7 +620,7 @@ + else if (kif->kf_sock_domain == AF_UNIX) { + struct sockaddr_un *sun; + +- sun = (struct sockaddr_un *)&kif->kf_sa_local; ++ sun = (struct sockaddr_un *)&kif->kf_un.kf_sock.kf_sa_local; + snprintf( + path, sizeof(path), "%.*s", + (int)(sun->sun_len - (sizeof(*sun) - sizeof(sun->sun_path))),