From 76e028c87087ca9e897a1d3b564379e67e3ce58a Mon Sep 17 00:00:00 2001 From: "Pascal S. de Kloe" Date: Wed, 4 Apr 2007 13:16:06 +0200 Subject: When EOVERFLOW is not defined, use EINVAL instead. --- src/input/input_dvb.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/input') diff --git a/src/input/input_dvb.c b/src/input/input_dvb.c index 39507ac15..10d6eca55 100644 --- a/src/input/input_dvb.c +++ b/src/input/input_dvb.c @@ -986,8 +986,13 @@ static int tuner_tune_it (tuner_t *this, struct dvb_frontend_parameters if (poll(pfd,1,3000)){ if (pfd[0].revents & POLLIN){ - if (ioctl(this->fd_frontend, FE_GET_EVENT, &event) == -EOVERFLOW){ +#ifdef EOVERFLOW + if (ioctl(this->fd_frontend, FE_GET_EVENT, &event) == -EOVERFLOW) { print_error("EOVERFLOW"); +#else + if (ioctl(this->fd_frontend, FE_GET_EVENT, &event) == -EINVAL) { + print_error("EINVAL"); +#endif return 0; } if (event.parameters.frequency <= 0) -- cgit v1.2.3 From 11256a884cae65ebfce0bc98cb5d034e431557c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Wed, 4 Apr 2007 13:38:41 +0200 Subject: Check for sys/dvdio.h, and use that if found, rather than having a check for the BSDs. Thanks to Pascal S. de Kloe for pointing at this. --- src/input/input_dvd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/input') diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c index 944ae88bd..14ff8c9e8 100644 --- a/src/input/input_dvd.c +++ b/src/input/input_dvd.c @@ -64,11 +64,11 @@ #endif /* WIN32 */ -#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) +#if defined(HAVE_LINUX_CDROM_H) +#include +#elif defined(HAVE_SYS_DVDIO_H) #include #include /* CDIOCALLOW etc... */ -#elif defined(HAVE_LINUX_CDROM_H) -#include #elif defined(HAVE_SYS_CDIO_H) #include #else -- cgit v1.2.3 From b34dcf208b9c69bfda299ab6fe035ad99ed7ec01 Mon Sep 17 00:00:00 2001 From: "Pascal S. de Kloe" Date: Wed, 4 Apr 2007 13:41:11 +0200 Subject: Cleanup check for WIN32, use #elif rather than #else/#ifdef. --- src/input/input_dvd.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/input') diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c index 14ff8c9e8..de47de0d5 100644 --- a/src/input/input_dvd.c +++ b/src/input/input_dvd.c @@ -71,14 +71,10 @@ #include /* CDIOCALLOW etc... */ #elif defined(HAVE_SYS_CDIO_H) #include -#else - -#ifdef WIN32 +#elif defined(WIN32) #include /* read() */ #else #warning "This might not compile due to missing cdrom ioctls" -#endif /* WIN32 */ - #endif /* DVDNAV includes */ -- cgit v1.2.3