mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2026-03-12 05:33:58 -04:00
Use FIONREAD instead of TIOCINQ
On Linux the two ioctls FIONREAD and TIOCINQ share the same number. However TIOCINQ is used for terminals while FIONREAD is used (among others) for sockets and pipes. Hence use FIONREAD here since it seems more appropriate.
This commit is contained in:
parent
6c2c7a5d42
commit
e4cc38055f
1 changed files with 2 additions and 2 deletions
|
|
@ -101,8 +101,8 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
|
|||
size_t n = 0;
|
||||
int l;
|
||||
|
||||
#ifdef TIOCINQ
|
||||
if (ioctl(u->fd, TIOCINQ, &l) >= 0 && l > 0)
|
||||
#ifdef FIONREAD
|
||||
if (ioctl(u->fd, FIONREAD, &l) >= 0 && l > 0)
|
||||
n = (size_t) l;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue