瀏覽代碼

Fixed compilation with older glibc versions (#640)

Markus Marb 8 年之前
父節點
當前提交
3e39d042d1
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/ua_types.c

+ 1 - 1
src/ua_types.c

@@ -91,7 +91,7 @@ UA_DateTime UA_DateTime_nowMonotonic(void) {
     clock_get_time(cclock, &mts);
     mach_port_deallocate(mach_task_self(), cclock);
     return (mts.tv_sec * UA_SEC_TO_DATETIME) + (mts.tv_nsec / 100);
-#elif defined(__CYGWIN__)
+#elif defined(__CYGWIN__) || !defined(CLOCK_MONOTONIC_RAW)
     struct timespec ts;
     clock_gettime(CLOCK_MONOTONIC, &ts);
     return (ts.tv_sec * UA_SEC_TO_DATETIME) + (ts.tv_nsec / 100);