Don't declare the variable l if FIONREAD is not defined.

This avoids two warnings due to FIONREAD not being defined.
This commit is contained in:
Diego Elio 'Flameeyes' Pettenò 2009-11-20 21:24:46 +01:00
parent 71ebbfb6ef
commit 09a58b6813
2 changed files with 4 additions and 2 deletions

View file

@ -101,9 +101,10 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
case PA_SINK_MESSAGE_GET_LATENCY: {
size_t n = 0;
int l;
#ifdef FIONREAD
int l;
if (ioctl(u->fd, FIONREAD, &l) >= 0 && l > 0)
n = (size_t) l;
#endif

View file

@ -105,9 +105,10 @@ static int source_process_msg(
case PA_SOURCE_MESSAGE_GET_LATENCY: {
size_t n = 0;
int l;
#ifdef FIONREAD
int l;
if (ioctl(u->fd, FIONREAD, &l) >= 0 && l > 0)
n = (size_t) l;
#endif