From nobody Fri Apr 29 23:21:36 2022 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 C6A3C19957D4; Fri, 29 Apr 2022 23:21:36 +0000 (UTC) (envelope-from git@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KqpQm2nm9z4Yff; Fri, 29 Apr 2022 23:21:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651274496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i0aLx+CnV/g4hHvh/YYquBcyFeAW61vGfK1zI9mN/gY=; b=FqFlWOYpJKMg4W9xvntJtS+AwcnP8Ams6kGok7tZCU2iD7S/Rh+AgJ1PviZe3+g+wPRhWo 3HSTT/g01Uin68Ea/emNJJFbaOZuHg8pboIEyOcSxmok6tmgBD/rF5CD/+wb7NRaeBTuUU JcWOdqCV2TtFvovfH98hyMJW7wEXDpSPiIjVZvrRJupbz6jsPHUcUqV1Ww5sAiO+s8Sxhf E4HxtANF5s1dbS5Zy3ISpOydxYrKwbTygeN3446yurCRfiwhAHTuBdlqkS1gpCzUveOkha Oe8altSvDOkg0nixKuVf/rCtdr+hTb6hJgddyj7mBtarUKrcskspPOGsd9CrwA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1F977163A3; Fri, 29 Apr 2022 23:21:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 23TNLaNB056871; Fri, 29 Apr 2022 23:21:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23TNLaKa056870; Fri, 29 Apr 2022 23:21:36 GMT (envelope-from git) Date: Fri, 29 Apr 2022 23:21:36 GMT Message-Id: <202204292321.23TNLaKa056870@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yuri Victorovich Subject: git: 3a450f6a64ee - main - devel/util-linux: Future-proofing patch 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=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuri X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3a450f6a64eebec85170be0a698ad98f3a930584 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651274496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i0aLx+CnV/g4hHvh/YYquBcyFeAW61vGfK1zI9mN/gY=; b=OHjn8+Ws/GwlCSM7FdEeHMaAxAWU1yekV5NxpLOGZsoC84LdlqsBLvn0EoWr16X+/z+Fe3 3U6WJD/D0HpIHCkF9arpHNGoBehaxRlg4rE2+cDY9331+TQKMipV2hheOVKXmbGF7U97dz ROMz6by9A09F7ZbQz2BP9ppxzA9xZFyQB9tc3UNzKAVJWrTe+ipCwfBTo1g3i/hOjnp5xU Y35RjtS0RL0miSu7GBRx/ADnppqt30TJfF9S9hkdgp5Jv1PxGJTw8IhH+m/WNne5RsivWo 3b6PdKEWNV8yHEH2Q13YqCDrxE0QF/bjU/TaMYYvQUpiJglz3Tv9lALSEKrgGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651274496; a=rsa-sha256; cv=none; b=TRZ/TN41u4V3Dfuu/UdTc1RsoSNsdQKugJFD+96NSxIED5e75O5PqvZ+MwW3AJsKG3mN+f 5S0VmN3vXPgaVOL6z3kwsaWssWxIjHiCSbv2fCNjF8OFVaPMqzs/FXrgelVlJSe+seunrg EONLuPyyMcopZRDbf9DtSL58Nuuh3oQsD2gZmCaVMw5lBAtfr2m762BkXLV1peVJrODgb+ Io07zmYXLeajGf39pHFHlsLvPaB3fsMOkPvCusB6Q08nQmtudaRMwimd5nArqWZCw8rTfo gl/XK6XGa3XWYuYP+Cr2hPy8vXcmxZ38RFy5OTiJURJymVi8Q5oq+GaVwS0yxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=3a450f6a64eebec85170be0a698ad98f3a930584 commit 3a450f6a64eebec85170be0a698ad98f3a930584 Author: Warner Losh AuthorDate: 2022-04-29 23:20:47 +0000 Commit: Yuri Victorovich CommitDate: 2022-04-29 23:21:30 +0000 devel/util-linux: Future-proofing patch --- devel/util-linux/files/patch-include_bitops.h | 40 +++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/devel/util-linux/files/patch-include_bitops.h b/devel/util-linux/files/patch-include_bitops.h new file mode 100644 index 000000000000..063fd8d843bb --- /dev/null +++ b/devel/util-linux/files/patch-include_bitops.h @@ -0,0 +1,40 @@ +commit a38d1f69fee5ca7e883b09ed3668a7da3b161051 +Author: Warner Losh +Date: Fri Apr 29 15:29:44 2022 -0600 + + BSD: Use byteswap.h and endian.h defined macos when present + + Newer versions of FreeBSD will have a glibc compatible + byteswap.h. Currently, this file assumes that FreeBSD requires + bswap{16,32,64} to always be defined. This isn't the case when we're + using the byteswap.h file (which is enabled by HAVE_BYTESWAP_H + define). Assume that if byteswap.h and endian.h are present, then the + proper macros are defined. Otherwise, assume that sys/endian.h is + present and paper over the small differences between the BSDs for this + file. + + Signed-off-by: Warner Losh + +--- include/bitops.h ++++ include/bitops.h +@@ -20,6 +20,12 @@ + # include + #endif + ++#if !(defined(HAVE_BYTESWAP_H) && defined(HAVE_ENDIAN_H)) ++/* ++ * When both byteswap.h and endian.h are preseent, the proper macros are defined ++ * as those files are glibc compatible. Otherwise, compensate for the slightly ++ * different interfaces between the different BSDs. ++ */ + #if defined(__OpenBSD__) + # include + # define be16toh(x) betoh16(x) +@@ -47,6 +53,7 @@ + # define bswap_32(x) OSSwapInt32(x) + # define bswap_64(x) OSSwapInt64(x) + #endif ++#endif + + /* + * Fallbacks