Merge "threads.h: avoid defining gettid on glibc >= 2.30" into main