[vlc-commits] DTV: more helpful error if kernel headers are old

Rémi Denis-Courmont git at videolan.org
Fri Mar 25 22:43:12 CET 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Mar 25 14:54:26 2011 +0200| [e4616d86019b808267fd66d7068b1bb53eac4c82] | committer: Rémi Denis-Courmont

DTV: more helpful error if kernel headers are old

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e4616d86019b808267fd66d7068b1bb53eac4c82
---

 modules/access/dtv/linux.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/modules/access/dtv/linux.c b/modules/access/dtv/linux.c
index 206f91f..090b960 100644
--- a/modules/access/dtv/linux.c
+++ b/modules/access/dtv/linux.c
@@ -32,6 +32,7 @@
 #include <poll.h>
 #include <unistd.h>
 #include <sys/ioctl.h>
+#include <linux/dvb/version.h>
 #include <linux/dvb/frontend.h>
 #include <linux/dvb/dmx.h>
 
@@ -41,6 +42,13 @@
 # define O_SEARCH O_RDONLY
 #endif
 
+#define DVBv5(minor) \
+        (DVB_API_VERSION > 5 \
+     || (DVB_API_VERSION == 5 && DVB_API_VERSION_MINOR >= (minor)))
+#if !DVBv5(0)
+# error Linux DVB kernel headers version 2.6.28 or later required.
+#endif
+
 /** Opens the device directory for the specified DVB adapter */
 static int dvb_open_adapter (uint8_t adapter)
 {



More information about the vlc-commits mailing list