openmrn
openmrn copied to clipboard
usleep is deprecated in posix API
wen have a bunch of usleep calls and with a recent compiler they cannot be compiled anymore unless we do #define _DEFAULT_SOURCE. The appropriate posix header does not export the function.
We need to review all call sites for usleep, and do one of the following:
- move the calls to .cxx and add _DEFAULT_SOURCE there
- or export the prototype to usleep ourselves (we already have an implementation for MCUs i believe).
POSIX.1-2001 declares this function obsolete; use nanosleep(2) instead. POSIX.1-2008 removes the specification of usleep().
We should consider implementing (where required) and using nanosleep instead.