--- ./third_party/kineto/libkineto/src/ThreadUtil.cpp_orig	2025-01-13 02:59:48.329689136 -0600
+++ ./third_party/kineto/libkineto/src/ThreadUtil.cpp	2025-01-13 04:34:17.164614300 -0600
@@ -10,7 +10,7 @@
 
 #ifndef _WIN32
 #include <pthread.h>
-#include <sys/syscall.h>
+//#include <sys/syscall.h>
 #include <sys/types.h>
 #include <unistd.h>
 #else // _WIN32
@@ -66,6 +66,9 @@
     sysTid = (int32_t)GetCurrentThreadId();
 #elif defined __FreeBSD__
     syscall(SYS_thr_self, &sysTid);
+#elif defined _AIX
+    #include<pthread.h>
+    sysTid = pthread_self();
 #else
     sysTid = (int32_t)syscall(SYS_gettid);
 #endif
@@ -135,6 +138,8 @@
   std::wstring wname = conv.from_bytes(name);
   HRESULT hr = _SetThreadDescription(GetCurrentThread(), wname.c_str());
   return SUCCEEDED(hr);
+#elif defined _AIX
+  return 0 == 0;
 #else
   return 0 == pthread_setname_np(pthread_self(), name.c_str());
 #endif
@@ -141,6 +146,9 @@
 }
 
 std::string getThreadName() {
+#ifdef _AIX
+return "Unknown";
+#elif
 #ifndef _WIN32
   char buf[kMaxThreadNameLength] = "";
   if (
@@ -169,6 +177,7 @@
   std::string name = conv.to_bytes(data);
   LocalFree(data);
   return name;
+#endif
 #endif
 }
 
