From a1ce3ccc4926617fbcb09c57b5bb9d78ded35aec Mon Sep 17 00:00:00 2001 From: wiz Date: Sat, 20 Mar 2010 19:46:14 +0000 Subject: Fix detection of available memory. From Ryu ONODERA in PR 42969. Bump PKGREVISION. --- archivers/xz/Makefile | 3 ++- archivers/xz/distinfo | 6 +++--- archivers/xz/patches/patch-aa | 4 ++-- archivers/xz/patches/patch-ab | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-) (limited to 'archivers') diff --git a/archivers/xz/Makefile b/archivers/xz/Makefile index c43c003ead1..06e794e9ab5 100644 --- a/archivers/xz/Makefile +++ b/archivers/xz/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.5 2009/12/13 23:48:15 heinz Exp $ +# $NetBSD: Makefile,v 1.6 2010/03/20 19:46:14 wiz Exp $ # DISTNAME= xz-4.999.9beta +PKGREVISION= 1 CATEGORIES= archivers MASTER_SITES= http://tukaani.org/xz/ diff --git a/archivers/xz/distinfo b/archivers/xz/distinfo index bf79531ad45..3fb3166aa48 100644 --- a/archivers/xz/distinfo +++ b/archivers/xz/distinfo @@ -1,7 +1,7 @@ -$NetBSD: distinfo,v 1.3 2009/09/04 16:57:14 wiz Exp $ +$NetBSD: distinfo,v 1.4 2010/03/20 19:46:14 wiz Exp $ SHA1 (xz-4.999.9beta.tar.gz) = 9627de3997ddcdb02f8d327e84b2cf1941ecd230 RMD160 (xz-4.999.9beta.tar.gz) = 1253ce01746c748c8549effa5041224044919c4e Size (xz-4.999.9beta.tar.gz) = 1037541 bytes -SHA1 (patch-aa) = e12358a68476f8c59b0f2886efc185bf2c1d1641 -SHA1 (patch-ab) = 190f58a65ebec8e7a978eb193e0841ec835bf3f1 +SHA1 (patch-aa) = db92bd036c6e449efbe1b2dff8993214c584adc4 +SHA1 (patch-ab) = 95261cc5700f554a825c4b7c9d64c02c25336745 diff --git a/archivers/xz/patches/patch-aa b/archivers/xz/patches/patch-aa index 7682e22c2c9..bb6c5971409 100644 --- a/archivers/xz/patches/patch-aa +++ b/archivers/xz/patches/patch-aa @@ -1,4 +1,4 @@ -$NetBSD: patch-aa,v 1.1 2009/09/04 16:57:14 wiz Exp $ +$NetBSD: patch-aa,v 1.2 2010/03/20 19:46:14 wiz Exp $ --- src/common/cpucores.h.orig 2009-08-27 15:37:12.000000000 +0000 +++ src/common/cpucores.h @@ -7,7 +7,7 @@ $NetBSD: patch-aa,v 1.1 2009/09/04 16:57:14 wiz Exp $ int cpus; size_t cpus_size = sizeof(cpus); - if (!sysctl(name, &cpus, &cpus_size, NULL, NULL) -+ if (sysctl(name, 2, &cpus, &cpus_size, NULL, 0) > 0 ++ if (sysctl(name, 2, &cpus, &cpus_size, NULL, 0) != -1 && cpus_size == sizeof(cpus) && cpus > 0) ret = (uint32_t)(cpus); #endif diff --git a/archivers/xz/patches/patch-ab b/archivers/xz/patches/patch-ab index c019dcee416..8b6bf908f9e 100644 --- a/archivers/xz/patches/patch-ab +++ b/archivers/xz/patches/patch-ab @@ -1,4 +1,4 @@ -$NetBSD: patch-ab,v 1.1 2009/09/04 16:57:14 wiz Exp $ +$NetBSD: patch-ab,v 1.2 2010/03/20 19:46:14 wiz Exp $ --- src/common/physmem.h.orig 2009-08-27 15:37:12.000000000 +0000 +++ src/common/physmem.h @@ -7,7 +7,7 @@ $NetBSD: patch-ab,v 1.1 2009/09/04 16:57:14 wiz Exp $ } mem; size_t mem_ptr_size = sizeof(mem.u64); - if (!sysctl(name, 2, &mem.u64, &mem_ptr_size, NULL, NULL)) { -+ if (sysctl(name, 2, &mem.u64, &mem_ptr_size, NULL, 0) > 0) { ++ if (sysctl(name, 2, &mem.u64, &mem_ptr_size, NULL, 0) != -1) { // IIRC, 64-bit "return value" is possible on some 64-bit // BSD systems even with HW_PHYSMEM (instead of HW_PHYSMEM64), // so support both. -- cgit v1.2.3