[MPlayer-users] TVout/matroxset/matroxset.c compile error with kernel headers >=2.5.x?
dizzyduck at uklinux.net
dizzyduck at uklinux.net
Thu Feb 12 23:11:24 CET 2004
Hi
I've just got a G400 from eBay and am trying to build the Matrox TV
out utilities in the TVout directory (matroxset, fbset, etc.).
However, compilation of matroxset.c fails with the following errors:
===
gee at duck:~/MPlayer-1.0pre3/TVout$ ./compile.sh
cc -O2 -W -Wall -c -o matroxset.o matroxset.c
matroxset.c: In function `main':
matroxset.c:95: error: parse error before '[' token
matroxset.c:101: error: parse error before '[' token
matroxset.c:104: error: parse error before '[' token
matroxset.c:110: error: parse error before '[' token
make: *** [matroxset.o] Error 1
cc -Wall -O2 -I. -c -o fbset.o fbset.c
bison -d modes.y
cc -Wall -O2 -I. -c -o modes.tab.o modes.tab.c
flex modes.l
cc -Wall -O2 -I. -c -o lex.yy.o lex.yy.c
lex.yy.c:1159: warning: `yyunput' defined but not used
cc fbset.o modes.tab.o lex.yy.o -o fbset
===
I messed about with matroxset.c and matroxfb.h and I think the problem
is with the _IOW/_IOWR macros used in matroxfb.h. These macros
were changed in 2.5/2.6. I found some posts on lkml regarding
apps breaking due to this change. I am using Debian unstable which
has 2.5.x headers in /usr/include. I am using kernel 2.4.24 (matroxfb
seems to be broken in 2.6?).
http://fxr.watson.org/fxr/source/include/asm-i386/ioctl.h?v=linux-2.6.0
http://fxr.watson.org/fxr/source/include/asm-i386/ioctl.h?v=linux-2.4.22
I changed the _IOC_TYPECHECK #define in ioctl.h to something trivial
(#define _IOC_TYPECHECK(t) 0) and the compilation was successful.
55 /* provoke compile error for invalid uses of size argument */
56 extern int __invalid_size_argument_for_IOC;
57 #define _IOC_TYPECHECK(t) \
58 ((sizeof(t) == sizeof(t[1]) && \
59 sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
60 sizeof(t) : __invalid_size_argument_for_IOC)
Of course, I could be talking complete crap here, but can I simply
bodge it like this and hope for the best?
Thanks
Gee
More information about the MPlayer-users
mailing list