Browse Source

Fix header file for Mac

vjpai 10 years ago
parent
commit
c234087312
1 changed files with 3 additions and 1 deletions
  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
 #else
 /* For some reason Apple's OSes haven't implemented clock_gettime. */
 /* 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 gpr_now(void) {
   gpr_timespec now;
   gpr_timespec now;
   struct timeval now_tv;
   struct timeval now_tv;