The gettid() library support was added in glibc 2.30. Earlier glibc
versions did not provide a wrapper for this system call, necessitating
the use of syscall(2).
Also, put _GNU_SOURCE definition in the guard to avoid the warning:
../engine/platform/linux/sys_linux.c:16: warning: "_GNU_SOURCE" redefined
#define _GNU_SOURCE
<command-line>: note: this is the location of the previous definition