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)

(cherry picked from commit e2a605e7ab7ff83d15b1a0b994223768169b0f1e)

Details

Provenance
kevansAuthored on Jun 17 2025, 2:17 PM
mmCommitted on Jun 20 2025, 8:15 PM
Parents
rGa46bed993750: libarchive: fix duplicate entry in tests Makefile
Branches
Unknown
Tags
Unknown