Explorar o código

Fixed compilation with older glibc versions (#640)

Markus Marb %!s(int64=8) %!d(string=hai) anos
pai
achega
3e39d042d1
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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);