From e4cc38055fb2b5408125eb6adc99d572098f1336 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 21 Dec 2008 13:33:32 +0100 Subject: 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. --- src/modules/module-pipe-sink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/module-pipe-sink.c b/src/modules/module-pipe-sink.c index ae230b2c..2b55c823 100644 --- a/src/modules/module-pipe-sink.c +++ b/src/modules/module-pipe-sink.c @@ -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 -- cgit