error compiling vdr 1.7.7 (frontend.h - '__u8' does not name a type)

Message ID 4A23BDCF.90604@cadsoft.de
State New
Headers

Commit Message

Klaus Schmidinger June 1, 2009, 11:38 a.m. UTC
  On 28.05.2009 16:49, VDR User wrote:
> Or you may also just do this:
> 
> --- vdr.c.orig        2009-04-12 11:05:51.000000000 -0700
> +++ vdr.c     2009-04-12 11:07:08.000000000 -0700
> @@ -32,6 +32,7 @@
>  #include <pwd.h>
>  #include <signal.h>
>  #include <stdlib.h>
> +#include <linux/types.h>
>  #include <sys/capability.h>
>  #include <sys/prctl.h>
>  #include <termios.h>

I don't see how this would make any difference, since the problem
is in compiling dvbdevice.c, not vdr.c

>From the suggestion in

  http://e-tobi.net/websvn/filedetails.php?repname=vdr-pkg&path=%2Fvdr%2Fbranches%2Fdevel%2Fdebian%2Fpatches%2F99_dvb-header-fixes.dpatch

posted earlier in this thread I found that this



alone fixes the problem (tested with the latest driver from http://linuxtv.org/hg/v4l-dvb).

Klaus
  

Comments

Carsten Koch June 21, 2009, 3:27 p.m. UTC | #1
On Mon, 2009-06-01 at 13:38 +0200, Klaus Schmidinger wrote:
...
> posted earlier in this thread I found that this
> 
> --- dvbdevice.h 2009/05/08 13:33:46     2.5
> +++ dvbdevice.h 2009/06/01 11:20:32
> @@ -10,6 +10,7 @@
>  #ifndef __DVBDEVICE_H
>  #define __DVBDEVICE_H
> 
> +#include <sys/mman.h> // FIXME: workaround for broken linux-dvb header files
>  #include <linux/dvb/frontend.h>
>  #include <linux/dvb/version.h>
>  #include "device.h"
> 
> 
> alone fixes the problem (tested with the latest driver from http://linuxtv.org/hg/v4l-dvb).

No, it does not.
At least not here (SuSE 11.1, 64-bit, vdr 1.7.8, v4l-dvb-af3d28c7ef19).

I am getting

g++ -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses -c -DREMOTE_KBD -DLIRC_DEVICE=\"/dev/lircd\" -DRCU_DEVICE=\"/dev/ttyS1\" -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DVIDEODIR=\"/video\" -DCONFDIR=\"/home/cko/vdrconfig\" -DPLUGINDIR=\"./PLUGINS/lib\" -DLOCDIR=\"./locale\" -I/usr/include/freetype2 -I/usr/src/v4l-dvb-af3d28c7ef19/linux/include vdr.c                                                                                                                                                                                                                                               
In file included from dvbdevice.h:14,                                                                                                                                                                                                                                                                                      
                 from vdr.c:45:                                                                                                                                                                                                                                                                                            
/usr/src/v4l-dvb-af3d28c7ef19/linux/include/linux/dvb/frontend.h:92: error: '__u8' does not name a type                                                                                                                                                                                                                    
/usr/src/v4l-dvb-af3d28c7ef19/linux/include/linux/dvb/frontend.h:93: error: '__u8' does not name a type                                                                                                                                                                                                                    
/usr/src/v4l-dvb-af3d28c7ef19/linux/include/linux/dvb/frontend.h:98: error: '__u8' does not name a type                                                                                                                                                                                                                    
/usr/src/v4l-dvb-af3d28c7ef19/linux/include/linux/dvb/frontend.h:99: error: '__u8' does not name a type                                                                                                                                                                                                                    
/usr/src/v4l-dvb-af3d28c7ef19/linux/include/linux/dvb/frontend.h:361: error: '__u8' does not name a type                                                                                                                                                                                                                   
make: *** [vdr.o] Error 1                                                                                                                                                                                                                                                                                                  
cko/vdr-1.7.8> 

I worked around it by inserting a

typedef unsigned char __u8;

after the 

#include <sys/mman.h> // FIXME: workaround for broken linux-dvb header files

in dvbdevice.h.

With that, vdr compiles without errors.


Carsten.
  

Patch

--- dvbdevice.h 2009/05/08 13:33:46     2.5
+++ dvbdevice.h 2009/06/01 11:20:32
@@ -10,6 +10,7 @@ 
 #ifndef __DVBDEVICE_H
 #define __DVBDEVICE_H

+#include <sys/mman.h> // FIXME: workaround for broken linux-dvb header files
 #include <linux/dvb/frontend.h>
 #include <linux/dvb/version.h>
 #include "device.h"