Add a configure test for gettid.
* configure.ac (HAVE_GETTID,HAVE_SYS_GETTID): New test. * src/debug.c: Include syscall.h if needed. (tid_log_callback) [HAVE_SYS_GETTID]: Use SYS_gettid
Linux introduced the gettid syscall with 2.4.11 but glibc only with
its version 2.30. This patch allows building on older platforms.
- Co-authored-by: lgh1