浏览代码

Merge pull request #517 from vjpai/mac

Fix time header file for Mac
Craig Tiller 10 年之前
父节点
当前提交
3609f786fd
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/core/support/time_posix.c

+ 3 - 1
src/core/support/time_posix.c

@@ -70,7 +70,9 @@ gpr_timespec gpr_now(void) {
 }
 #else
 /* For some reason Apple's OSes haven't implemented clock_gettime. */
-/* TODO(klempner): Add special handling for Apple. */
+
+#include <sys/time.h>
+
 gpr_timespec gpr_now(void) {
   gpr_timespec now;
   struct timeval now_tv;