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:
Lennart Poettering 2008-12-21 13:33:32 +01:00
parent 63fc26ed03
commit 10cc4ba1ca

View file

@ -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