Get us closer to building busybox

This change undefines __linux__ and adds APIs like clock_settime(). The
gosh darned getopt_long() API has been reintroduced, thanks to OpenBSD.
This commit is contained in:
Justine Tunney 2023-06-18 04:02:01 -07:00
parent 5ac522f0de
commit 0409096658
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
52 changed files with 914 additions and 37 deletions

View file

@ -91,3 +91,17 @@ int cfsetispeed(struct termios *t, uint32_t speed) {
return 0;
}
}
/**
* Sets input and output baud rate.
*
* @param speed can be `B0`, `B50`, `B38400`, `B4000000`, etc.
* @return 0 on success, or -1 w/ errno
* @raise EINVAL if `speed` isn't valid
* @asyncsignalsafe
*/
int cfsetspeed(struct termios *t, uint32_t speed) {
if (cfsetispeed(t, speed) == -1) return -1;
if (cfsetospeed(t, speed) == -1) return -1;
return 0;
}