Compilation issues with recent DVB header files vs libc6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

Recent DVB driver releases (now in Kernel 2.6.29) cause trouble compiling
VDR (see snippet A below).

The common solution to this seems to be to add a "-D__KERNEL_STRICT_NAMES".

It felt wrong somehow and I didn't liked this, so I tried another
solution, which is to have any libc6 <sys/*> includes appear before the
linux DVB header includes <linux/*>. Doing this only in dvbdevice.c seems
to do the trick for VDR (see snippet B). I works for VDR 1.6.0 as well as
VDR 1.7.4.

I think the root of this problem is caused by the Kernel headers / DVB
drivers changing from asm/types.h to linux/types.h:

-#include <asm/types.h>
+#include <linux/types.h>

How should this problem ideally be fixed? Is my solution (snippet B)
better than using -D__KERNEL_STRICT_NAMES or should the kernel / DVB
driver developers be blamed for this?

Tobias

--- snippet A ---

In file included from /usr/include/netinet/in.h:24,
                 from /usr/include/arpa/inet.h:23,
                 from config.h:13,
                 from channels.h:13,
                 from device.h:13,
                 from dvbdevice.h:15,
                 from dvbdevice.c:10:
/usr/include/stdint.h:41: error: conflicting declaration 'typedef long int
int64_t'
/usr/include/linux/types.h:98: error: 'int64_t' has a previous declaration
as 'typedef __s64 int64_t'
/usr/include/stdint.h:56: error: conflicting declaration 'typedef long
unsigned int uint64_t'
/usr/include/linux/types.h:96: error: 'uint64_t' has a previous
declaration as 'typedef __u64 uint64_t'


--- snippet B ---

--- vdr-1.6.0.orig/dvbdevice.c
+++ vdr-1.6.0/dvbdevice.c
@@ -7,6 +7,8 @@
  * $Id: dvbdevice.c 1.170 2008/02/09 16:11:44 kls Exp $
  */

+#include <sys/ioctl.h>
+#include <sys/mman.h>
 #include "dvbdevice.h"
 #include <errno.h>
 #include <limits.h>
@@ -15,8 +17,6 @@
 #include <linux/dvb/dmx.h>
 #include <linux/dvb/frontend.h>
 #include <linux/dvb/video.h>
-#include <sys/ioctl.h>
-#include <sys/mman.h>
 #include "channels.h"
 #include "diseqc.h"
 #include "dvbci.h"

_______________________________________________
vdr mailing list
vdr@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux