diff options
author | sunpoet <sunpoet@FreeBSD.org> | 2017-09-09 05:51:56 +0800 |
---|---|---|
committer | sunpoet <sunpoet@FreeBSD.org> | 2017-09-09 05:51:56 +0800 |
commit | e9243ef267c10095b548d23d2141dff9bf412ecc (patch) | |
tree | 7413ab3f95ed33215c87c480693c42c90da7a42b /sysutils/py-psutil | |
parent | 4f4009b250c7c60e311877c37bce77e2f8a684e5 (diff) | |
download | freebsd-ports-gnome-e9243ef267c10095b548d23d2141dff9bf412ecc.tar.gz freebsd-ports-gnome-e9243ef267c10095b548d23d2141dff9bf412ecc.tar.zst freebsd-ports-gnome-e9243ef267c10095b548d23d2141dff9bf412ecc.zip |
Update ino64 support
Submitted by: Andrey V. Elsukov <bu7cher@yandex.ru>
Diffstat (limited to 'sysutils/py-psutil')
-rw-r--r-- | sysutils/py-psutil/files/patch-psutil-arch-freebsd-proc_socks.c | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/sysutils/py-psutil/files/patch-psutil-arch-freebsd-proc_socks.c b/sysutils/py-psutil/files/patch-psutil-arch-freebsd-proc_socks.c index b96ef2f07dd8..a97bbb4dceac 100644 --- a/sysutils/py-psutil/files/patch-psutil-arch-freebsd-proc_socks.c +++ b/sysutils/py-psutil/files/patch-psutil-arch-freebsd-proc_socks.c @@ -1,6 +1,6 @@ --- psutil/arch/freebsd/proc_socks.c.orig 2017-08-03 16:14:27 UTC +++ psutil/arch/freebsd/proc_socks.c -@@ -136,7 +136,11 @@ psutil_search_tcplist(char *buf, struct +@@ -136,20 +136,36 @@ psutil_search_tcplist(char *buf, struct if (kif->kf_sock_domain == AF_INET) { if (!psutil_sockaddr_matches( AF_INET, inp->inp_lport, &inp->inp_laddr, @@ -12,7 +12,12 @@ continue; if (!psutil_sockaddr_matches( AF_INET, inp->inp_fport, &inp->inp_faddr, -@@ -145,7 +149,11 @@ psutil_search_tcplist(char *buf, struct ++#if __FreeBSD_version >= 1200031 ++ &kif->kf_un.kf_sock.kf_sa_peer)) ++#else + &kif->kf_sa_peer)) ++#endif + continue; } else { if (!psutil_sockaddr_matches( AF_INET6, inp->inp_lport, &inp->in6p_laddr, @@ -24,7 +29,15 @@ continue; if (!psutil_sockaddr_matches( AF_INET6, inp->inp_fport, &inp->in6p_faddr, -@@ -243,7 +251,11 @@ psutil_proc_connections(PyObject *self, ++#if __FreeBSD_version >= 1200031 ++ &kif->kf_un.kf_sock.kf_sa_peer)) ++#else + &kif->kf_sa_peer)) ++#endif + continue; + } + +@@ -243,19 +259,35 @@ psutil_proc_connections(PyObject *self, inet_ntop( kif->kf_sock_domain, psutil_sockaddr_addr(kif->kf_sock_domain, @@ -36,7 +49,13 @@ lip, sizeof(lip)); inet_ntop( -@@ -253,7 +265,11 @@ psutil_proc_connections(PyObject *self, + kif->kf_sock_domain, + psutil_sockaddr_addr(kif->kf_sock_domain, ++#if __FreeBSD_version >= 1200031 ++ &kif->kf_un.kf_sock.kf_sa_peer), ++#else + &kif->kf_sa_peer), ++#endif rip, sizeof(rip)); lport = htons(psutil_sockaddr_port(kif->kf_sock_domain, @@ -46,9 +65,15 @@ &kif->kf_sa_local)); +#endif rport = htons(psutil_sockaddr_port(kif->kf_sock_domain, ++#if __FreeBSD_version >= 1200031 ++ &kif->kf_un.kf_sock.kf_sa_peer)); ++#else &kif->kf_sa_peer)); ++#endif -@@ -287,7 +303,11 @@ psutil_proc_connections(PyObject *self, + // construct python tuple/list + py_laddr = Py_BuildValue("(si)", lip, lport); +@@ -287,7 +319,11 @@ psutil_proc_connections(PyObject *self, else if (kif->kf_sock_domain == AF_UNIX) { struct sockaddr_un *sun; |