From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Aug 8 20:00:12 2009 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DCFA31065670 for ; Sat, 8 Aug 2009 20:00:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id ADFE18FC2B for ; Sat, 8 Aug 2009 20:00:12 +0000 (UTC) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n78K0Cq4004424 for ; Sat, 8 Aug 2009 20:00:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n78K0CjO004423; Sat, 8 Aug 2009 20:00:12 GMT (envelope-from gnats) Resent-Date: Sat, 8 Aug 2009 20:00:12 GMT Resent-Message-Id: <200908082000.n78K0CjO004423@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Martin Birgmeier Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5F5A106566B for ; Sat, 8 Aug 2009 19:52:25 +0000 (UTC) (envelope-from martin@email.aon.at) Received: from email.aon.at (nat-warsl417-02.aon.at [195.3.96.120]) by mx1.freebsd.org (Postfix) with ESMTP id 019AB8FC15 for ; Sat, 8 Aug 2009 19:52:24 +0000 (UTC) Received: (qmail 6056 invoked from network); 8 Aug 2009 19:25:44 -0000 Received: from smarthub95.highway.telekom.at (HELO email.aon.at) ([172.18.5.234]) (envelope-sender ) by fallback44.highway.telekom.at (qmail-ldap-1.03) with SMTP for ; 8 Aug 2009 19:25:44 -0000 Received: (qmail 17835 invoked from network); 8 Aug 2009 19:25:42 -0000 Received: from 91-113-13-58.adsl.highway.telekom.at (HELO gandalf.xyzzy) ([91.113.13.58]) (envelope-sender ) by smarthub95.highway.telekom.at (qmail-ldap-1.03) with SMTP for ; 8 Aug 2009 19:25:42 -0000 Received: from gandalf.xyzzy (localhost.xyzzy [127.0.0.1]) by gandalf.xyzzy (8.14.3/8.14.3) with ESMTP id n78JPfqZ097304 for ; Sat, 8 Aug 2009 21:25:41 +0200 (CEST) (envelope-from martin@gandalf.xyzzy) Received: (from martin@localhost) by gandalf.xyzzy (8.14.3/8.14.3/Submit) id n78JPfZc097303; Sat, 8 Aug 2009 21:25:41 +0200 (CEST) (envelope-from martin) Message-Id: <200908081925.n78JPfZc097303@gandalf.xyzzy> Date: Sat, 8 Aug 2009 21:25:41 +0200 (CEST) From: Martin Birgmeier To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/137581: [patch] lzmautils-devel (xz): correct detection of number of processors X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Martin Birgmeier List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Aug 2009 20:00:13 -0000 >Number: 137581 >Category: ports >Synopsis: [patch] lzmautils-devel (xz): correct detection of number of processors >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Aug 08 20:00:12 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Martin Birgmeier >Release: FreeBSD 7.2-RELEASE i386 >Organization: MBi at home >Environment: latest ports >Description: there is a bug in the source code of xz which prevents it from correctly detecting the number of processors. patch follows. >How-To-Repeat: run 'xz -H' on a multi-core machine and verify that it always reports "one" for the maximum number of threads it will use >Fix: ------------------------------ snip ------------------------------ --- ./src/xz/hardware.c.ORIG 2008-11-19 15:21:23.000000000 +0100 +++ ./src/xz/hardware.c 2009-08-08 21:13:49.000000000 +0200 @@ -42,7 +42,7 @@ static void hardware_cores(void) { -#if defined(HAVE_NUM_PROCESSORS_SYSCONF) +#if defined(HAVE_NCPU_SYSCONF) const long cpus = sysconf(_SC_NPROCESSORS_ONLN); if (cpus > 0) opt_threads = (size_t)(cpus); ------------------------------ snip ------------------------------ This should probably also be reported upstream. >Release-Note: >Audit-Trail: >Unformatted: