Change the definition of ADJFREQ_MIN so that it does not shift
a negative value. Such shifting is undefined in standard C.
This came up when cross-compiling the kernel using ports clang.
The shifting becomes defined when compiling with option -fwrapv.
Base clang enables this option by default.
OK naddy@ cheloha@
-/* $OpenBSD: kern_time.c,v 1.151 2020/12/23 20:45:02 cheloha Exp $ */
+/* $OpenBSD: kern_time.c,v 1.152 2021/05/31 12:45:33 visa Exp $ */
/* $NetBSD: kern_time.c,v 1.20 1996/02/18 11:57:06 fvdl Exp $ */
/*
}
#define ADJFREQ_MAX (500000000LL << 32)
-#define ADJFREQ_MIN (-500000000LL << 32)
+#define ADJFREQ_MIN (-ADJFREQ_MAX)
int
sys_adjfreq(struct proc *p, void *v, register_t *retval)