Use portability for SYS_gettid
authorMichael Lee <mzlee@fb.com>
Mon, 2 May 2016 23:14:23 +0000 (16:14 -0700)
committerFacebook Github Bot 9 <facebook-github-bot-9-bot@fb.com>
Mon, 2 May 2016 23:20:54 +0000 (16:20 -0700)
Summary: It's there for a reason, so use it.

Reviewed By: yfeldblum

Differential Revision: D3249849

fb-gh-sync-id: e9fe330693a173acd987e0c8fd1f03a982c8e082
fbshipit-source-id: e9fe330693a173acd987e0c8fd1f03a982c8e082

folly/io/async/test/TimeUtil.cpp

index de9f325bc287d86e1402271510013e95bdf948b0..558aa22a0891c0f1c6b9b529a4e5153309b43aab 100644 (file)
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+#ifndef __STDC_FORMAT_MACROS
 #define __STDC_FORMAT_MACROS
+#endif
 
 #include <folly/io/async/test/TimeUtil.h>
 
 #include <folly/Conv.h>
+#include <folly/portability/SysSyscall.h>
 
 #include <chrono>
 #include <sys/types.h>
@@ -40,7 +43,7 @@ namespace folly {
  * glibc doesn't provide gettid(), so define it ourselves.
  */
 static pid_t gettid() {
-  return syscall(SYS_gettid);
+  return syscall(FOLLY_SYS_gettid);
 }
 
 /**