From nobody Wed Oct 27 06:42:33 2021 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7E9DE1819B42; Wed, 27 Oct 2021 06:42:33 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (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 "freefall.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HfJyx3G9Bz4bkq; Wed, 27 Oct 2021 06:42:33 +0000 (UTC) (envelope-from danfe@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1635316953; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=DlyVVd8c3xO6L7U2+8R3GJqpiOj4NY4RthR9e4HH+Vc=; b=npZxu7eD71JPfFp0NNhE8PD065o5AEDH+my9pSmP4ovQira3mmmobF8iVUPSJ6A0QRi6db W5cZ1GGWxZ6tZcsbqz7VRaUsHscRdT7Y9rNPSJJEeVTJW5VFDAJLDji7LTb07sbOEDpC9j SNOc9B/CvxBgEMsgWF++X/5SRBTqhqNtys1hmMChdDCQvDq21ENqdtAYGPb3f9V/FgpN5l dhrhGulxR93UsHbdHex+wEA5rmZrVv7xw1T6WMYTg4v27FZLhNgHMDZyXuo8BFVZpoQhvM +DWxgN+Owkp9ZtOtmivvBdLIfIEb2LkJoRtWQ0Jnh4FRUptpSdpeUYG0JZqw1w== Received: by freefall.freebsd.org (Postfix, from userid 1033) id 659B1B702; Wed, 27 Oct 2021 06:42:33 +0000 (UTC) Date: Wed, 27 Oct 2021 06:42:33 +0000 From: Alexey Dokuchaev To: Piotr Kubaj Cc: ports-committers@freebsd.org, dev-commits-ports-all@freebsd.org, dev-commits-ports-main@freebsd.org Subject: Re: git: 981564583497 - main - net/cjdns: fix build on powerpc64* Message-ID: References: <202110261848.19QImqrt031580@gitrepo.freebsd.org> List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202110261848.19QImqrt031580@gitrepo.freebsd.org> ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1635316953; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=DlyVVd8c3xO6L7U2+8R3GJqpiOj4NY4RthR9e4HH+Vc=; b=QJTGeZPhH3Z7aa4qpczGrWRbDtRuUSPU82VPUjBiHtjzkD5Hdi1HvbhaS2gyhrLIYSgNzc Pn0COMlHg6tvO80uQlI/rEcFyFRp6yHdbcf3dWfa39POYyTdemkMdIe/n4sYIfDry75kgw i6MHvKrsvPPoSBOReV4DK8Q8rh8emFCneFJQkO2TlRDVgxLfPdnyGWy4pWD/UQuyeSkokE RytBz3JpeQ8zUzpb6g2bqm5/Rln7ubYCtGdZLZ4gmotaiTm8QKm3fkOO6Q8smKuDtqN45v xDZ9Eo69qgRTKuDeujk7Y2SJjIi2+Y4WwXIj6BRd3l76WWNevLQCUIDPsRiFsQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1635316953; a=rsa-sha256; cv=none; b=JizFVcrgceqhEpJ6Lvh/8xlOrQE/L6hT/h6SqMf3ccZP5VwhxtO1rfydUR3A9O2QEQs0mQ 9RfRbPFTjvQL1kZE8hJuhZre85kQceCUbIs/bXqc6BAwhVVK1KI5iQNAQOm801YPNigV6N +A465vRg+YRQ6YjtLFDGHhA+bsRA9R/YEsZjMy19DwLRs8JvWSw4TH2ZBmD92IIHaM7pRA x2H51nv2Z+2hyVysH2vxKbQinzY4TlHDvd87WEb0+P1p2skiTX5YFK1jnXLRtMCr8VkcTQ i5WFiid4mO4KG+5EM9cUaz2KIwJFxItkmy1SgAjZYtSzOxauMZ4UzymrM0bnIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On Tue, Oct 26, 2021 at 06:48:52PM +0000, Piotr Kubaj wrote: > commit 9815645834977fe2ada5052d3c81881b7624bed7 > > net/cjdns: fix build on powerpc64* > > On powerpc64 and powerpc64le systems, os.cpus(), gets defined to []: > > cpus = os.cpus() > [] > > It has type object: > > typeof cpus > 'object' > > This causes jobs to be 0: > > Math.floor((typeof cpus === 'undefined' ? 1 : cpus.length) * 1.25); > 0 > > Change it so that instead of comparing type to undefined, we compare to 0: > > Math.floor((os.cpus() == 0 ? 1 : cpus.length) * 1.25); Wouldn't os.cpus() == [] be more correct^Wreadable? On a related note, JavaScript is horrible language, don't write in it. Pro tip: if some $lang has === operator, it's highly likely that it is just as bad. ./danfe