From owner-svn-ports-all@freebsd.org Thu Aug 13 11:33:05 2020 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 047C63BEADB; Thu, 13 Aug 2020 11:33:05 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BS4FD6Kf5z4Bvl; Thu, 13 Aug 2020 11:33:04 +0000 (UTC) (envelope-from fernape@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A34101C5C1; Thu, 13 Aug 2020 11:33:04 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07DBX4hm002558; Thu, 13 Aug 2020 11:33:04 GMT (envelope-from fernape@FreeBSD.org) Received: (from fernape@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07DBX4HS002557; Thu, 13 Aug 2020 11:33:04 GMT (envelope-from fernape@FreeBSD.org) Message-Id: <202008131133.07DBX4HS002557@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fernape set sender to fernape@FreeBSD.org using -f From: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= Date: Thu, 13 Aug 2020 11:33:04 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r544804 - branches/2020Q3/devel/sigar/files X-SVN-Group: ports-branches X-SVN-Commit-Author: fernape X-SVN-Commit-Paths: branches/2020Q3/devel/sigar/files X-SVN-Commit-Revision: 544804 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Aug 2020 11:33:05 -0000 Author: fernape Date: Thu Aug 13 11:33:04 2020 New Revision: 544804 URL: https://svnweb.freebsd.org/changeset/ports/544804 Log: MFH: r544794 devel/sigar: build after filedesc struct change In base revision r363214[1] we dropped the fd_lastfile field of the filedesc struct. This breaks devel/sigar. The applied solution was proposed by mjg@ in this[2] mail thread. [1] https://svnweb.freebsd.org/changeset/base/363214 [2] https://lists.freebsd.org/pipermail/freebsd-ports/2020-August/119093.html PR: 248460 Submitted by: ronald-lists@klop.ws Approved by: ports-secteam (blanket, build fix) Modified: branches/2020Q3/devel/sigar/files/patch-src_os_darwin_darwin__sigar.c Directory Properties: branches/2020Q3/ (props changed) Modified: branches/2020Q3/devel/sigar/files/patch-src_os_darwin_darwin__sigar.c ============================================================================== --- branches/2020Q3/devel/sigar/files/patch-src_os_darwin_darwin__sigar.c Thu Aug 13 11:29:06 2020 (r544803) +++ branches/2020Q3/devel/sigar/files/patch-src_os_darwin_darwin__sigar.c Thu Aug 13 11:33:04 2020 (r544804) @@ -1,5 +1,5 @@ ---- src/os/darwin/darwin_sigar.c.orig 2014-11-17 13:46:20.000000000 -0800 -+++ src/os/darwin/darwin_sigar.c 2017-04-20 15:52:24.386676000 -0700 +--- src/os/darwin/darwin_sigar.c.orig 2014-11-17 21:46:20 UTC ++++ src/os/darwin/darwin_sigar.c @@ -123,6 +123,69 @@ #endif @@ -70,7 +70,7 @@ #define KI_FD ki_fd #define KI_PID ki_pid -@@ -342,24 +405,21 @@ +@@ -342,24 +405,21 @@ static int sigar_vmstat(sigar_t *sigar, vm_statistics_ } } #elif defined(__FreeBSD__) @@ -79,15 +79,15 @@ { - int status; - size_t size = sizeof(unsigned int); -- ++ size_t size; + - status = kread(sigar, vmstat, sizeof(*vmstat), - sigar->koffsets[KOFFSET_VMMETER]); - - if (status == SIGAR_OK) { - return SIGAR_OK; - } -+ size_t size; - +- SIGAR_ZERO(vmstat); /* derived from src/usr.bin/vmstat/vmstat.c */ @@ -104,7 +104,7 @@ /* sys */ GET_VM_STATS(sys, v_swtch, 0); -@@ -399,9 +459,13 @@ +@@ -399,9 +459,13 @@ static int sigar_vmstat(sigar_t *sigar, struct vmmeter GET_VM_STATS(vm, v_active_count, 0); GET_VM_STATS(vm, v_inactive_target, 0); GET_VM_STATS(vm, v_inactive_count, 1); @@ -118,7 +118,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); -@@ -440,7 +504,7 @@ +@@ -440,7 +504,7 @@ int sigar_mem_get(sigar_t *sigar, sigar_mem_t *mem) unsigned long mem_total; #endif #if defined(__FreeBSD__) @@ -127,7 +127,7 @@ #elif defined(__OpenBSD__) || defined(__NetBSD__) struct uvmexp vmstat; #endif -@@ -479,7 +543,11 @@ +@@ -479,7 +543,11 @@ int sigar_mem_get(sigar_t *sigar, sigar_mem_t *mem) kern *= sigar->pagesize; #elif defined(__FreeBSD__) if ((status = sigar_vmstat(sigar, &vmstat)) == SIGAR_OK) { @@ -139,7 +139,7 @@ kern *= sigar->pagesize; mem->free = vmstat.v_free_count; mem->free *= sigar->pagesize; -@@ -689,7 +757,7 @@ +@@ -689,7 +757,7 @@ int sigar_swap_get(sigar_t *sigar, sigar_swap_t *swap) swap->page_out = vmstat.pageouts; #elif defined(__FreeBSD__) struct kvm_swap kswap[1]; @@ -148,7 +148,16 @@ if (getswapinfo_sysctl(kswap, 1) != SIGAR_OK) { if (!sigar->kmem) { -@@ -3055,8 +3123,13 @@ +@@ -1897,7 +1965,7 @@ int sigar_proc_fd_get(sigar_t *sigar, sigar_pid_t pid, + free(ofiles); + #else + /* seems the same as the above */ +- procfd->total = filed.fd_lastfile; ++ procfd->total = filed.fd_nfiles; + #endif + + return SIGAR_OK; +@@ -3055,8 +3123,13 @@ static int net_connection_get(sigar_net_connection_wal int type, istcp = 0; char *buf; const char *mibvar; @@ -162,7 +171,7 @@ struct xinpgen *xig, *oxig; struct xsocket *so; size_t len; -@@ -3094,6 +3167,15 @@ +@@ -3094,6 +3167,15 @@ static int net_connection_get(sigar_net_connection_wal xig->xig_len > sizeof(struct xinpgen); xig = (struct xinpgen *)((char *)xig + xig->xig_len)) { @@ -178,7 +187,7 @@ if (istcp) { struct xtcpcb *cb = (struct xtcpcb *)xig; tp = &cb->xt_tp; -@@ -3105,6 +3187,7 @@ +@@ -3105,6 +3187,7 @@ static int net_connection_get(sigar_net_connection_wal inp = &cb->xi_inp; so = &cb->xi_socket; }