diff -Naur qtbase-everywhere-src-6.6.2/src/corelib/thread/qthread.h qtbase-everywhere-src-6.6.2_new/src/corelib/thread/qthread.h --- qtbase-everywhere-src-6.6.2/src/corelib/thread/qthread.h 2024-02-08 16:01:05.000000000 -0000 +++ qtbase-everywhere-src-6.6.2_new/src/corelib/thread/qthread.h 2024-02-22 03:30:33.943940073 -0000 @@ -165,7 +165,12 @@ __asm__("movq %%gs:0, %0" : "=r" (tid) : : ); #elif defined(Q_PROCESSOR_X86_64) && ((defined(Q_OS_LINUX) && defined(__GLIBC__)) || defined(Q_OS_FREEBSD)) // x86_64 Linux, BSD uses FS +# if defined(__ILP32__) + __asm__("mov %%fs:%c1, %0" : "=r" (tid) : "i" (2 * sizeof(void*)) : ); +# else __asm__("movq %%fs:%c1, %0" : "=r" (tid) : "i" (2 * sizeof(void*)) : ); +# endif + #elif defined(Q_PROCESSOR_X86_64) && defined(Q_OS_WIN) // See https://en.wikipedia.org/wiki/Win32_Thread_Information_Block // First get the pointer to the TIB