lib: Use __has_attribute() to check for attribute availability
commit0989e39aba56f4c2745324bdedf4a9d794591d3b
authorGuillem Jover <guillem@debian.org>
Fri, 23 Dec 2022 21:49:58 +0000 (23 22:49 +0100)
committerGuillem Jover <guillem@debian.org>
Sat, 24 Dec 2022 18:26:50 +0000 (24 19:26 +0100)
treef591898cf13912fd5967d6c9396e352f4803aa1e
parentfc44e9edd298fc9fb637ed937c92f81f4fcc0084
lib: Use __has_attribute() to check for attribute availability

While most compilers currently define gcc macro versions, so that these
kind of checks work. It's just more correct to perform a feature check,
to test for the actual attribute being supported, in case the compiler
has support for __has_attribute().
lib/compat/compat.h
lib/dpkg/macros.h