opnsense-ports/lang/intel-compute-runtime/files/patch-clock_gettime
Franco Fichtner 358f59d866 */*: sync with upstream
Taken from: HardenedBSD
2020-01-31 13:33:41 +01:00

24 lines
759 B
Text

CLOCK_MONOTONIC_RAW doesn't exist on non-Linux systems.
runtime/os_interface/linux/os_time_linux.cpp:61:21: error:
use of undeclared identifier 'CLOCK_MONOTONIC_RAW'
if (getTimeFunc(CLOCK_MONOTONIC_RAW, &ts)) {
^
runtime/os_interface/linux/os_time_linux.cpp:138:24: error:
use of undeclared identifier 'CLOCK_MONOTONIC_RAW'
if (resolutionFunc(CLOCK_MONOTONIC_RAW, &ts)) {
^
--- core/os_interface/linux/os_time_linux.cpp.orig 2020-01-23 10:09:13 UTC
+++ core/os_interface/linux/os_time_linux.cpp
@@ -14,6 +14,10 @@
#include <time.h>
+#ifndef CLOCK_MONOTONIC_RAW
+#define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC
+#endif
+
namespace NEO {
OSTimeLinux::OSTimeLinux(OSInterface *osInterface) {