From: Michael Lee Date: Wed, 23 Dec 2015 20:38:29 +0000 (-0800) Subject: Change `SYS_gettid` to __NR_gettid instead X-Git-Tag: deprecate-dynamic-initializer~175 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=2a0cb93725b4adae2b3fa901aa0ff6107786bd06;p=folly.git Change `SYS_gettid` to __NR_gettid instead 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 --- diff --git a/folly/experimental/fibers/Fiber.cpp b/folly/experimental/fibers/Fiber.cpp index b4fea854..9721e903 100644 --- a/folly/experimental/fibers/Fiber.cpp +++ b/folly/experimental/fibers/Fiber.cpp @@ -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; }