--- seamonkey-2.39/mozilla/tools/profiler/core/platform-linux.cc.orig
+++ seamonkey-2.39/mozilla/tools/profiler/core/platform-linux.cc
@@ -98,6 +98,10 @@
 
 #define SIGNAL_SAVE_PROFILE SIGUSR2
 
+#ifndef gettid
+#define gettid() syscall(SYS_gettid)
+#endif
+
 using namespace mozilla;
 
 #if defined(USE_LUL_STACKWALK)
