[MPlayer-users] Re: Can't compile matroxset:

adland adland123 at yahoo.com
Tue May 18 05:36:17 CEST 2004


error is not obvious from first glance at matroxset.c code
 due to use of nested macros

if you wanted to see the error code (containing the [ ) you could issue

cc -O2 -E -o preproc matroxset.c
vi preproc (preprocessed C code - expanded the macros)

from gcc man page
 -E  Stop after the preprocessing stage; do not run the compiler proper. 

I have debian but not your matrox card anymore
Try this patch (diff) which compiles for me

issue was _IOWR and _IOW macro in /usr/include/asm/ioctl.h imported from
matroxfb.h expects third argument is NOT a sizeof argument

reference to this was found in a quick search engine check for _IOWR

good luck

~/CVS$ diff -Naur main/TVout/matroxset/matroxfb.h 
updated/TVout/matroxset/matroxfb.h
--- main/TVout/matroxset/matroxfb.h     2001-02-24 15:29:00.000000000 -0500
+++ updated/TVout/matroxset/matroxfb.h  2004-05-17 23:16:30.000000000 -0400
@@ -13,16 +13,16 @@
 #define MATROXFB_OUTPUT_MODE_NTSC      0x0002
 #define MATROXFB_OUTPUT_MODE_MONITOR   0x0080
 };
-#define MATROXFB_SET_OUTPUT_MODE       _IOW('n',0xFA,sizeof(struct
matroxioc_output_mode))
-#define MATROXFB_GET_OUTPUT_MODE       _IOWR('n',0xFA,sizeof(struct
matroxioc_output_mode))
+#define MATROXFB_SET_OUTPUT_MODE       _IOW('n',0xFA,struct
 matroxioc_output_mode)
+#define MATROXFB_GET_OUTPUT_MODE       _IOWR('n',0xFA,struct 
matroxioc_output_mode)

 /* bitfield */
 #define MATROXFB_OUTPUT_CONN_PRIMARY   (1 << MATROXFB_OUTPUT_PRIMARY)
 #define MATROXFB_OUTPUT_CONN_SECONDARY (1 << MATROXFB_OUTPUT_SECONDARY)
 /* connect these outputs to this framebuffer */
-#define MATROXFB_SET_OUTPUT_CONNECTION _IOW('n',0xF8,sizeof(__u32))
+#define MATROXFB_SET_OUTPUT_CONNECTION _IOW('n',0xF8,__u32)
 /* which outputs are connected to this framebuffer */
-#define MATROXFB_GET_OUTPUT_CONNECTION _IOR('n',0xF8,sizeof(__u32))
+#define MATROXFB_GET_OUTPUT_CONNECTION _IOR('n',0xF8,__u32)
 /* which outputs are available for this framebuffer */
 #define MATROXFB_GET_AVAILABLE_OUTPUTS _IOR('n',0xF9,sizeof(__u32))
 /* which outputs exist on this framebuffer */







More information about the MPlayer-users mailing list