[MPlayer-dev-eng] [PATCH] fix error when compiling libdha with svgalib_helper

Glyn Kennington glyn.kennington at ox.compsoc.net
Tue Sep 2 21:16:17 CEST 2003


If the svgalib_helper directory (the one from svgalib.org, rather than 
http://www.mplayerhq.hu/~alex/svgalib_helper-1.9.17-mplayer.tar.bz2) 
is present when compiling libdha, then there are several compiler errors
of the form

In file included from libdha.c:65:
svgalib_helper/svgalib_helper.h:28: conflicting types for `io_string_t'
svgalib_helper/svgalib_helper.h:28: previous declaration of `io_string_t'

This is because libdha.c #includes svgalib_helper.h twice:  Once
directly, and once via AsmMacros.h and sysdep/AsmMacros_$arch.h .
pci.c also has the same problem, including it via both AsmMacros.h and
sysdep/pci_linux.h .

Alex' version gets around this by placing an #ifndef around
svgalib_helper.h, but this trivial patch fixes it for the svgalib.org
version too.

Glyn

-- 
glyn at ox.compsoc.net
-------------- next part --------------
diff -u -r1.10 libdha.c
--- libdha/libdha.c     2 Feb 2003 12:27:35 -0000       1.10
+++ libdha/libdha.c     2 Sep 2003 19:27:16 -0000
@@ -61,10 +61,6 @@
 #include "kernelhelper/dhahelper.h"
 #endif
 
-#ifdef CONFIG_SVGAHELPER
-#include <svgalib_helper.h>
-#endif
-
 static int mem_fd = -1;
 
 void *map_phys_mem(unsigned long base, unsigned long size)
diff -u -r1.7 pci_linux.c
--- libdha/sysdep/pci_linux.c   20 Dec 2002 21:07:27 -0000      1.7
+++ libdha/sysdep/pci_linux.c   2 Sep 2003 19:27:16 -0000
@@ -21,7 +21,6 @@
 #endif
 
 #ifdef CONFIG_SVGAHELPER
-#include <svgalib_helper.h>
 #ifdef __linux__
 #include <linux/ioctl.h>
 #endif


More information about the MPlayer-dev-eng mailing list