View | Details | Raw Unified | Return to bug 2228 | Differences between
and this patch

Collapse All | Expand All

(-)./misc.c.orig (+5 lines)
Lines 870-877 monotime(void) Link Here
870
	static int gettime_failed = 0;
870
	static int gettime_failed = 0;
871
871
872
	if (!gettime_failed) {
872
	if (!gettime_failed) {
873
#if defined(CLOCK_BOOTTIME)
874
		if (clock_gettime(CLOCK_BOOTTIME, &ts) == 0)
875
			return (ts.tv_sec);
876
#else
873
		if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0)
877
		if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0)
874
			return (ts.tv_sec);
878
			return (ts.tv_sec);
879
#endif
875
		debug3("clock_gettime: %s", strerror(errno));
880
		debug3("clock_gettime: %s", strerror(errno));
876
		gettime_failed = 1;
881
		gettime_failed = 1;
877
	}
882
	}

Return to bug 2228