• Yann E. MORIN's avatar
    log: Don't require execinfo.h and backtrace() · 3d094ade
    Yann E. MORIN authored
    Not all toolchains have execinfo.h and backtrace(). For example,
    support for it is optional in uClibc, while it is entirely missing
    from musl.
    In glibc, execinfo.h only declares backtrace() and no other function,
    so we can rely on its presence/abscence to determine if we can use
    We fix that by:
      - adding a ./configure check for execinfo.h;
      - moving backtrace to its own file;
      - compiling backtrace.c only when execinfo.h was found.
log.c 5.82 KB