]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUILD: tools: fix build with static only toolchains
authorBaruch Siach <baruch@tkos.co.il>
Fri, 24 Jul 2020 04:52:20 +0000 (07:52 +0300)
committerWilly Tarreau <w@1wt.eu>
Fri, 24 Jul 2020 11:55:40 +0000 (13:55 +0200)
commite1651b2970a699c517e185115e8f866dd5a04c92
tree05c1c0db2c2187429c95393ed2b6f4e93226827d
parent0f17a4444e641b6e16bff49e3bd99466f637b272
BUILD: tools: fix build with static only toolchains

uClibc toolchains built with no dynamic library support don't provide
the dlfcn.h header. That leads to build failure:

  CC      src/tools.o
src/tools.c:15:10: fatal error: dlfcn.h: No such file or directory
 #include <dlfcn.h>
          ^~~~~~~~~
Enable dladdr on Linux platforms only when USE_DL is defined.

This should be backported wherever 109201fc5 ("BUILD: tools: rely on
__ELF__ not USE_DL to enable use of dladdr()") is backported (currently
only 2.2 and 2.1).
src/tools.c