From owner-svn-ports-head@freebsd.org Tue Mar 21 07:36:40 2017 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CB5BD16A2E; Tue, 21 Mar 2017 07:36:40 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2AA2C1E50; Tue, 21 Mar 2017 07:36:40 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2L7ad2v080595; Tue, 21 Mar 2017 07:36:39 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2L7adI1080593; Tue, 21 Mar 2017 07:36:39 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201703210736.v2L7adI1080593@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 21 Mar 2017 07:36:39 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r436567 - in head/devel/sigar: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Mar 2017 07:36:40 -0000 Author: glebius (src committer) Date: Tue Mar 21 07:36:38 2017 New Revision: 436567 URL: https://svnweb.freebsd.org/changeset/ports/436567 Log: Make it compilable on FreeBSD 12 after struct inpcb and struct tcpcb were stopped being exported. Modified: head/devel/sigar/Makefile head/devel/sigar/files/patch-src_os_darwin_darwin__sigar.c Modified: head/devel/sigar/Makefile ============================================================================== --- head/devel/sigar/Makefile Tue Mar 21 07:22:05 2017 (r436566) +++ head/devel/sigar/Makefile Tue Mar 21 07:36:38 2017 (r436567) @@ -3,7 +3,7 @@ PORTNAME= sigar PORTVERSION= 1.7.3 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel MAINTAINER= tj@FreeBSD.org Modified: head/devel/sigar/files/patch-src_os_darwin_darwin__sigar.c ============================================================================== --- head/devel/sigar/files/patch-src_os_darwin_darwin__sigar.c Tue Mar 21 07:22:05 2017 (r436566) +++ head/devel/sigar/files/patch-src_os_darwin_darwin__sigar.c Tue Mar 21 07:36:38 2017 (r436567) @@ -1,6 +1,6 @@ ---- src/os/darwin/darwin_sigar.c.orig 2014-11-17 21:46:20 UTC -+++ src/os/darwin/darwin_sigar.c -@@ -399,9 +399,13 @@ static int sigar_vmstat(sigar_t *sigar, +--- src/os/darwin/darwin_sigar.c.orig 2014-11-17 13:46:20.000000000 -0800 ++++ src/os/darwin/darwin_sigar.c 2017-03-20 23:32:31.935016000 -0700 +@@ -399,9 +399,13 @@ GET_VM_STATS(vm, v_active_count, 0); GET_VM_STATS(vm, v_inactive_target, 0); GET_VM_STATS(vm, v_inactive_count, 1); @@ -14,7 +14,7 @@ GET_VM_STATS(vm, v_pageout_free_min, 0); GET_VM_STATS(vm, v_interrupt_free_min, 0); GET_VM_STATS(vm, v_forks, 0); -@@ -479,7 +483,11 @@ int sigar_mem_get(sigar_t *sigar, sigar_ +@@ -479,7 +483,11 @@ kern *= sigar->pagesize; #elif defined(__FreeBSD__) if ((status = sigar_vmstat(sigar, &vmstat)) == SIGAR_OK) { @@ -26,3 +26,41 @@ kern *= sigar->pagesize; mem->free = vmstat.v_free_count; mem->free *= sigar->pagesize; +@@ -3055,8 +3063,13 @@ + int type, istcp = 0; + char *buf; + const char *mibvar; ++#if defined(__FreeBSD__) && (__FreeBSD_version >= 1200026) ++ struct xtcpcb *tp = NULL; ++ struct xinpcb *inp; ++#else + struct tcpcb *tp = NULL; + struct inpcb *inp; ++#endif + struct xinpgen *xig, *oxig; + struct xsocket *so; + size_t len; +@@ -3094,6 +3107,15 @@ + xig->xig_len > sizeof(struct xinpgen); + xig = (struct xinpgen *)((char *)xig + xig->xig_len)) + { ++#if defined(__FreeBSD__) && (__FreeBSD_version >= 1200026) ++ if (istcp) { ++ tp = (struct xtcpcb *)xig; ++ inp = &tp->xt_inp; ++ } else { ++ inp = (struct xinpcb *)xig; ++ } ++ so = &inp->xi_socket; ++#else + if (istcp) { + struct xtcpcb *cb = (struct xtcpcb *)xig; + tp = &cb->xt_tp; +@@ -3105,6 +3127,7 @@ + inp = &cb->xi_inp; + so = &cb->xi_socket; + } ++#endif + + if (so->xso_protocol != proto) { + continue;