]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUILD: compiler: include compiler's definitions before ours
authorWilly Tarreau <w@1wt.eu>
Thu, 24 Nov 2022 06:51:57 +0000 (07:51 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 24 Nov 2022 07:30:48 +0000 (08:30 +0100)
commit4d466385405295f769ec65291f511160ffd11ade
treeaa62ece8fb779df072270d4c34073d6599be1317
parenta4728584ffc19bff3893a00061591f53bb60f5c5
BUILD: compiler: include compiler's definitions before ours

Building with TCC caused a warning on __attribute__() being redefined,
because we do define it on compilers that don't have it, but we didn't
include the compiler's definitions first to leave it a chance to expose
its definitions. The correct way to do this would be to include
sys/cdefs.h but we currently don't include it explicitly and a few
reports on the net mention some platforms where it could be missing
by default. Let's use inttypes.h instead, it always causes it (or its
equivalent) to be included and we know it's present on supported
platforms since we already depend on it.

No backport is needed.
include/haproxy/compiler.h