HomeFreeBSD

audio/jack: Fix alignas() on non-packed architectures

Description

audio/jack: Fix alignas() on non-packed architectures

Unbreak the build with Clang on architectures where JACK uses non-packed
data structures, like arm64 or powerpc. The alignment errors are exposed
there because:

  • The non-packed data structures require 8 byte alignment.
  • alignas() is not allowed to weaken alignment requirements to 4 bytes.
  • Clang enforces this according to standard, GCC ignores it.

Use an additional alignas() specifier to let the compiler choose between
minimum alignment (packed) and "natural" alignment (non-packed). This is
both standard c++11 and compatible with older GCC, which does not
propagate alignment requirements of packed substructures properly.

PR: 261508
Submitted by: Florian Walpen <dev@submerge.ch>

Details

Provenance
Mikael Urankar <mikael@FreeBSD.org>Authored on Feb 9 2022, 2:49 PM
Parents
R11:55d4a9f74dca: www/deno: Update to 1.18.2
Branches
Unknown
Tags
Unknown

Event Timeline

Mikael Urankar <mikael@FreeBSD.org> committed R11:22c0c4f2a6e5: audio/jack: Fix alignas() on non-packed architectures (authored by Mikael Urankar <mikael@FreeBSD.org>).Feb 9 2022, 4:19 PM