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).
1 file changed