From: Oliver Kurth Date: Fri, 27 Jul 2018 18:46:21 +0000 (-0700) Subject: Common source file change not directly applicable to open-vm-tools. X-Git-Tag: stable-11.0.0~507 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=322dba026b1b19799c3e34eab8452c7bbf805148;p=thirdparty%2Fopen-vm-tools.git Common source file change not directly applicable to open-vm-tools. --- diff --git a/open-vm-tools/lib/system/systemLinux.c b/open-vm-tools/lib/system/systemLinux.c index 5b067bef1..c74d48901 100644 --- a/open-vm-tools/lib/system/systemLinux.c +++ b/open-vm-tools/lib/system/systemLinux.c @@ -162,11 +162,13 @@ System_GetTimeMonotonic(void) return base + (last = current); #else // VM_X86_64 -#ifdef sun - /* Solaris has a bug where times() can return a lower value than in - * a previous call, see bug #1710952, so we make sure to never - * return a lower value, by saving the old value and compare. - * We also make that thread safe. */ +#if defined sun || defined __APPLE__ + /* + * PR 1710952 and PR 2136820 + * times() on Solaris & Mac can return a lower value than the + * one in a previous call. As a workaround, we return the last + * cached value when we get a lower value from times(). + */ static Atomic_uint64 last = { 0 }; while (1) {