diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2021-09-12 23:52:40 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2021-09-13 00:03:39 +0200 |
commit | e5540b5a3a545ed4e3f3df97be131ec81a155032 (patch) | |
tree | ee8725f594ae602dd8043abf2f960e387d5a12d0 /lib/fstream/printf.c | |
parent | 3ef7c3bb37e40de2653daf306e8bcb2a87446271 (diff) |
Fix struct offset testing in ABI test case
The intention of the (severely incomplete) ABI test case is to detect
changes to the ABI of libsquashfs. Currently it tries to blurt out if
the layout of some structure is changed unintentionally.
Unfortunately, the test uses some unportable assumptions. Among other
things, it was assumed that a 64 bit field will always require 64 bit
alignment. This is apparently no the case on 32 bit x86.
This patch makes the check work on 32 bit and 64 bit x86, by adding
an additional runtime check that relies on the __alignof__ extension
offered by gcc and clang (the only 2 compilers that are really
supported at the moment).
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/fstream/printf.c')
0 files changed, 0 insertions, 0 deletions