mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-06 11:18:30 +00:00
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:
parent
5ac522f0de
commit
0409096658
52 changed files with 914 additions and 37 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue