From nobody Sun Dec 18 17:43:40 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 4NZqvK1PdYz1Gm0D; Sun, 18 Dec 2022 17:43:41 +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 4NZqvK0wspz4HXs; Sun, 18 Dec 2022 17:43:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671385421; 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=BKPSUdG5Ipiqm7JWibzYrFv32L6TLNudg6g2kZMFcrk=; b=UEhXzBTnxlTci2uFQVxManLfs8G/ACQnDYLHc4mFpiIzZ1uxp/y2UHwcXunk/WMBlgslgd +ZMCriF4odo+kWjY0puo7e4uoQI4A7cYBh3mpRe+qKhE1577oWVXX7k9uajU/l4HNxumWc lZWhOw8LTSnKrSsfb6xJVgwj7kTlwbXzfL5Evt9MgcUlTMX3DIEsvGkSaPIma/6tASkPtu BdmqK7fjrq7JyYEVgE0K3awQLXQwgpHHySVR1GiMSchh13ietIotIFimGJaDrFx/cb7B1/ 2gs0RIyzfzr3aBhk3cKQDqecDP5DRPhkY5uqUy449xecV4RAUSvR5UT+nWK1ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671385421; 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=BKPSUdG5Ipiqm7JWibzYrFv32L6TLNudg6g2kZMFcrk=; b=rt4+6RoKs4/uuom9nFlaBEdihNbC91bygJmginghPvGwZ+B7USjB+FeTwKV8EX2GseMJqk 4KkVxEV0dSQIVunTQVM1O8LLbUmAswcpaNARN+t7tVR1iZOVrViaXzqUzDcAudaDnMqMrd 6/+ODfVwTO9XGn6RumWjeCldUPOPuX4+ztz8wzzaMVtqg/RAEP3AYTSrPnk893l5sZ53fF +LgNoB20wBZw4FCYxvbnmHZm6Q9P48JAh9YuCNB7udxjYn2BNOvwYdLlFqMpggTEIS/a+N AFX6LHopIsh5m/ON1Ruf6NfKfJRGAPppLucK2c/nxMYiinonp5Z16zmMVeVEHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1671385421; a=rsa-sha256; cv=none; b=rD3GiO2YAs/glpEpqURvmJMzmxs7XLUvLR7lCbeQZLknHjrkW/BOr6w8DpO86RSr9NFQOg iWw5imd6/EfbmJOr5AAJjiIs000qSwdSusL61s+P/OfaUe+UwY8sCbG1vxM2lJplCcGXb4 HqCpXvWoj3g04Wg5x/9l47FQhoYp61iQodVc9cFjXWThHVC0qEmhxo/VNIe3zRDihiHp3p uqzmAE1H94/Fegp41brqdVMGxLslIngrdUFTcJoyc4Z6lnTFiwdCfH+bQ/IzQ/Y9gdM+4p BC1lfOblihXznQJ40uBKiTS0gqLst2a/4eoyvYJrzXyf2LnTK69BaUZ/3faSIQ== 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 4NZqvK00NvzPsb; Sun, 18 Dec 2022 17:43:41 +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 2BIHheRD006233; Sun, 18 Dec 2022 17:43:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2BIHheN8006232; Sun, 18 Dec 2022 17:43:40 GMT (envelope-from git) Date: Sun, 18 Dec 2022 17:43:40 GMT Message-Id: <202212181743.2BIHheN8006232@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dimitry Andric Subject: git: 76a985cab04d - main - devel/zziplib: fix build with clang 15 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: dim X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 76a985cab04d771c8446662c310fe2261e722fac Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim (src committer): URL: https://cgit.FreeBSD.org/ports/commit/?id=76a985cab04d771c8446662c310fe2261e722fac commit 76a985cab04d771c8446662c310fe2261e722fac Author: Dimitry Andric AuthorDate: 2022-12-05 22:55:48 +0000 Commit: Dimitry Andric CommitDate: 2022-12-18 17:22:14 +0000 devel/zziplib: fix build with clang 15 During an exp-run for llvm 15 (see bug 265425), it turned out that devel/zziplib failed to build with clang (and lld) 15: /wrkdirs/usr/ports/devel/zziplib/work/zziplib-0.13.72/zzip/mmapped.c:664:11: error: incompatible pointer to integer conversion initializing 'off_t' (aka 'long') with an expression of type 'zzip_byte_t *' (aka 'unsigned char *') [-Wint-conversion] off_t offset = zzip_file_header_to_data(header); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /wrkdirs/usr/ports/devel/zziplib/work/zziplib-0.13.72/zzip/mmapped.c:666:34: warning: incompatible pointer types initializing 'struct zzip_extra_zip64 *' with an expression of type 'char *' [-Wincompatible-pointer-types] struct zzip_extra_zip64* zip64 = ^ /wrkdirs/usr/ports/devel/zziplib/work/zziplib-0.13.72/zzip/mmapped.c:673:34: warning: incompatible pointer types initializing 'struct zzip_extra_zip64 *' with an expression of type 'char *' [-Wincompatible-pointer-types] struct zzip_extra_zip64* zip64 = ^ /wrkdirs/usr/ports/devel/zziplib/work/zziplib-0.13.72/zzip/mmapped.c:685:24: error: incompatible integer to pointer conversion assigning to 'Bytef *' (aka 'unsigned char *') from 'off_t' (aka 'long') [-Wint-conversion] file->zlib.next_in = offset; ^ ~~~~~~ 2 warnings and 2 errors generated. Use the patch from https://github.com/gdraheim/zziplib/issues/140 to fix the errors. PR: 268185 Approved by: portmgr (tcberner) MFH: 2022Q4 --- devel/zziplib/files/patch-zzip_mmapped.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/devel/zziplib/files/patch-zzip_mmapped.c b/devel/zziplib/files/patch-zzip_mmapped.c new file mode 100644 index 000000000000..7685ee124185 --- /dev/null +++ b/devel/zziplib/files/patch-zzip_mmapped.c @@ -0,0 +1,20 @@ +--- zzip/mmapped.c.orig 2021-01-04 23:05:08 UTC ++++ zzip/mmapped.c +@@ -661,7 +661,7 @@ zzip_disk_entry_fopen(ZZIP_DISK * disk, ZZIP_DISK_ENTR + + ___ /* a ZIP64 extended block may follow. */ + size_t csize = zzip_file_header_csize(header); +- off_t offset = zzip_file_header_to_data(header); ++ size_t offset = zzip_file_header_sizeto_end(header); + if (csize == 0xFFFFu) { + struct zzip_extra_zip64* zip64 = + zzip_file_header_to_extras(header); +@@ -682,7 +682,7 @@ zzip_disk_entry_fopen(ZZIP_DISK * disk, ZZIP_DISK_ENTR + file->zlib.zalloc = Z_NULL; + file->zlib.zfree = Z_NULL; + file->zlib.avail_in = csize; +- file->zlib.next_in = offset; ++ file->zlib.next_in = (Bytef *)header + offset; + ____; + + DBG2("compressed size %i", (int) file->zlib.avail_in);