Change `SYS_gettid` to __NR_gettid instead
authorMichael Lee <mzlee@fb.com>
Wed, 23 Dec 2015 20:38:29 +0000 (12:38 -0800)
committerfacebook-github-bot-1 <folly-bot@fb.com>
Wed, 23 Dec 2015 21:20:21 +0000 (13:20 -0800)
Summary: SYS_gettid is not available on all platforms, but __NR_gettid should be.

Reviewed By: dcolascione

Differential Revision: D2787003

fb-gh-sync-id: ee024437ac95281a3573e2440653847f6f7d1738

folly/experimental/fibers/Fiber.cpp

index b4fea854afbea52ab793907c36855480ebba7e9f..9721e903f4064df5792a1af2dc73326fb464c76e 100644 (file)
@@ -38,7 +38,7 @@ pid_t localThreadId() {
   // OSX doesn't support thread_local.
   static FOLLY_TLS pid_t threadId = 0;
   if (UNLIKELY(threadId == 0)) {
-    threadId = syscall(SYS_gettid);
+    threadId = syscall(__NR_gettid);
   }
   return threadId;
 }