]> git.ipfire.org Git - thirdparty/squid.git/commit
Fix FreeBSD 14 build (#975)
authorDavid CARLIER <devnexen@gmail.com>
Mon, 7 Feb 2022 00:35:28 +0000 (00:35 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Mon, 7 Feb 2022 13:52:00 +0000 (13:52 +0000)
commitb2188e4d6bce80f2f93e3f99e11f3d054f5e8b60
tree5f59b3ae978a5d1234c2b2fe3737c9cfc4055d8d
parent4f019e78d1208ac750665bc98b67df83c0b60b48
Fix FreeBSD 14 build (#975)

FreeBSD 14 defines 3-parameter CPU_AND() macro as a `do {} while` loop.
Our (void) in front of that loop creates a syntax error.

    CpuAffinitySet.cc:41:16: error: expected expression
    (void) CPU_AND(&cpuSet, &cpuSet, &theOrigCpuSet);

That (void) was added in commit 7ec6d51 to "remove GNU-specific syntax",
but we cannot tell what specific problem that 10-year old change solved.
Known 3-parameter CPU_AND(3) documentation says the call returns void.

Also included a missing header providing IPPROTO_TCP definition.
src/CpuAffinitySet.cc
src/comm/Tcp.cc