Casts to clockid_t in CLOCK_MONOTONIC causing preprocessor error
While adding support for 6-freebsd-current
updates to Freebsd have caused an issue with the newlib define of CLOCK_MONOTONIC
and CLOCK_BOOTTIME
.
In https://github.com/freebsd/freebsd-src/blob/main/contrib/wpa/src/utils/os_unix.c#L109 the preprocessor compares CLOCK_MONOTONIC
and CLOCK_BOOTTIME
. newlib includes casts to clockid_t
in the define causing the compiler to throw the following error.
from ../../freebsd/contrib/wpa/src/utils/includes.h:49,
from ../../freebsd/contrib/wpa/src/utils/os_unix.c:11:
../../freebsd/contrib/wpa/src/utils/os_unix.c: In function 'os_get_reltime':
../../freebsd/contrib/wpa/src/utils/os_unix.c:116:52: error: missing binary operator before token "4"
116 | #if !(defined(CLOCK_BOOTTIME) && CLOCK_BOOTTIME == CLOCK_MONOTONIC)
|
Freebsd doesn't include casts in their defines, bring newlib inline with Freebsd would solve this issue.
Edited by Aaron Nyholm