libbtrfsutil: declare struct btrfs_ioctl_search_header as packed

The search header is used for extracting data from buffer returned by
the SEARCH_TREE ioctl and needs special access helpers as there are no
guarantees about alignment.

With -fsanitize=alignment this still leads to an error because address
of the members is taken, regardless of the unaligned access method is
used (both temporary memcpy to a structure or the packed struct cast).

Add another hint to compiler that the structure is special and add the
packed attribute. This fixes the sanitizer error.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2024-05-29 21:56:31 +02:00
parent 06c7012a54
commit d8c7a5e6f4