mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-31 22:25:33 -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
63fc26ed03
commit
10cc4ba1ca
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;
|
size_t n = 0;
|
||||||
int l;
|
int l;
|
||||||
|
|
||||||
#ifdef TIOCINQ
|
#ifdef FIONREAD
|
||||||
if (ioctl(u->fd, TIOCINQ, &l) >= 0 && l > 0)
|
if (ioctl(u->fd, FIONREAD, &l) >= 0 && l > 0)
|
||||||
n = (size_t) l;
|
n = (size_t) l;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue