HomeFreeBSD

libarchive/test: fix build when memcpy() is a macro

Description

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.

This corresponds to libarchive PR #2660

Reported by: Shawn Webb (HardenedBSD)

Details

Provenance
kevansAuthored on Jun 17 2025, 2:17 PM
Parents
rG124120d44ba2: tcp: remove TCPTV_TWTRUNC
Branches
Unknown
Tags
Unknown