mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-24 19:51:11 +00:00
hurd TIOCFLUSH: Cope BSD 4.1 semantic
BSD 4.1 did not have an argument for TIOCFLUSH, BSD 4.2 added it. There are still a lot of applications out there that pass a NULL argument to TIOCFLUSH, so we should rather cope with it.
This commit is contained in:
parent
d5c8f98c5e
commit
36231bee7a
@ -113,6 +113,10 @@ __ioctl (int fd, unsigned long int request, ...)
|
||||
/* We don't want to advance ARG since it will be used to copy out
|
||||
too if IOC_OUT is also set. */
|
||||
void *argptr = arg;
|
||||
int zero = 0;
|
||||
|
||||
if (request == TIOCFLUSH && !arg)
|
||||
arg = &zero;
|
||||
|
||||
/* Pack an argument into the message buffer. */
|
||||
void in (unsigned int count, enum __ioctl_datum type)
|
||||
|
Loading…
Reference in New Issue
Block a user