Index: components/timers/alarm_timer_unittest.cc |
diff --git a/components/timers/alarm_timer_unittest.cc b/components/timers/alarm_timer_unittest.cc |
index 14c55a9fc7bdff6dfec4068c9c57aaa976693fad..879db5119da635c033c1c059d82c1b930b706c99 100644 |
--- a/components/timers/alarm_timer_unittest.cc |
+++ b/components/timers/alarm_timer_unittest.cc |
@@ -412,7 +412,11 @@ void TimerRanCallback(bool* did_run) { |
} |
bool IsAlarmTimerSupported() { |
+#ifdef CLOCK_REALTIME_ALARM |
int fd = timerfd_create(CLOCK_REALTIME_ALARM, 0); |
+#else |
+ int fd = -1; |
+#endif |
if (fd == -1) { |
LOG(WARNING) << "CLOCK_REALTIME_ALARM is not supported on this system. " |