Added Android Hack to `time.c`.

Android bionic defines `TIME_UTC` but does not provide `timespec_get`.
parent 11071b9a
...@@ -296,7 +296,7 @@ current_mrb_time(mrb_state *mrb) ...@@ -296,7 +296,7 @@ current_mrb_time(mrb_state *mrb)
struct mrb_time *tm; struct mrb_time *tm;
tm = (struct mrb_time *)mrb_malloc(mrb, sizeof(*tm)); tm = (struct mrb_time *)mrb_malloc(mrb, sizeof(*tm));
#if defined(TIME_UTC) #if defined(TIME_UTC) && !defined(__ANDROID__)
{ {
struct timespec ts; struct timespec ts;
if (timespec_get(&ts, TIME_UTC) == 0) { if (timespec_get(&ts, TIME_UTC) == 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment