]> git.ipfire.org Git - thirdparty/libarchive.git/commit
libarchive/test: fix build when memcpy() is a macro 2660/head
authorKyle Evans <kevans@FreeBSD.org>
Tue, 3 Jun 2025 02:43:28 +0000 (21:43 -0500)
committerKyle Evans <kevans@FreeBSD.org>
Tue, 3 Jun 2025 02:46:28 +0000 (21:46 -0500)
commitb76c4042aee90fbba10070c1b1c34d7ddc905536
tree1b5975d944744939dc7a2a5523194e0ff165c1fc
parent0f9a06d6abb1ab00e48580d488facbd78240ee50
libarchive/test: fix build when memcpy() is a macro

After importing the latest libarchive into FreeBSD, Shawn Webb @
HardenedBSD noted that the test build is broken when FORTIFY_SOURCE=2
while building the base system.  Braced initializer lists are a special
case that need some extra fun parentheses when we're dealing with the
preprocessor.

While it's not a particularly common setup, the extra parentheses don't
really hurt readability all that much so it's worth fixing for wider
compatibility.

Fixes: libarchive/libarchive#2657
libarchive/test/test_write_format_mtree_preset_digests.c