[MPlayer-users] mplayer compile fixes
Mikulas Patocka
mikulas at artax.karlin.mff.cuni.cz
Wed Oct 22 20:46:21 CEST 2003
Hi
This patch fixes mplayer compile errors on glibc 2.0
1:
you have functions with argument "unsigned" in prototype and declare it
with argument "uint32_t".
If headers contains #define uint32_t unsigned, it works, but if they
contain typedef unsigned uint32_t, it doesn't.
2:
not all libcs contain modify_ldt, use syscall macro instead.
3:
you cannot assign to stdin/stdout/stderr, because it can be a macro.
Mikulas
-------------- next part --------------
diff -u -r b/MPlayer-1.0pre2/libvo/vesa_lvo.c MPlayer-1.0pre2/libvo/vesa_lvo.c
--- b/MPlayer-1.0pre2/libvo/vesa_lvo.c Fri Jul 26 14:42:43 2002
+++ MPlayer-1.0pre2/libvo/vesa_lvo.c Wed Oct 22 19:40:39 2003
@@ -286,7 +286,7 @@
#endif
}
-uint32_t vlvo_query_info(uint32_t format)
+uint32_t vlvo_query_info(unsigned format)
{
if(verbose > 1) printf("vesa_lvo: query_format was called: %x (%s)\n",format,vo_format_name(format));
return 1;
diff -u -r b/MPlayer-1.0pre2/libvo/vosub_vidix.c MPlayer-1.0pre2/libvo/vosub_vidix.c
--- b/MPlayer-1.0pre2/libvo/vosub_vidix.c Thu Oct 2 17:01:51 2003
+++ MPlayer-1.0pre2/libvo/vosub_vidix.c Wed Oct 22 20:04:12 2003
@@ -337,7 +337,7 @@
vo_draw_text(vidix_play.src.w,vidix_play.src.h,draw_alpha);
}
-uint32_t vidix_query_fourcc(uint32_t format)
+uint32_t vidix_query_fourcc(unsigned format)
{
if(verbose > 1) printf("vosub_vidix: query_format was called: %x (%s)\n",format,vo_format_name(format));
vidix_fourcc.fourcc = format;
diff -u -r b/MPlayer-1.0pre2/loader/ldt_keeper.c MPlayer-1.0pre2/loader/ldt_keeper.c
--- b/MPlayer-1.0pre2/loader/ldt_keeper.c Sat Sep 6 02:14:08 2003
+++ MPlayer-1.0pre2/loader/ldt_keeper.c Wed Oct 22 20:29:08 2003
@@ -30,6 +30,7 @@
#define modify_ldt_ldt_s user_desc
#endif
/* prototype it here, so we won't depend on kernel headers */
+/*
#ifdef __cplusplus
extern "C" {
#endif
@@ -37,6 +38,8 @@
#ifdef __cplusplus
}
#endif
+*/
+_syscall3( int, modify_ldt, int, func, void *, ptr, unsigned long, bytecount );
#else
#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
#include <machine/segments.h>
diff -u -r b/MPlayer-1.0pre2/osdep/vbelib.c MPlayer-1.0pre2/osdep/vbelib.c
--- b/MPlayer-1.0pre2/osdep/vbelib.c Fri May 16 18:34:57 2003
+++ MPlayer-1.0pre2/osdep/vbelib.c Wed Oct 22 19:18:46 2003
@@ -106,8 +106,10 @@
my_stderr = fopen(ttyname(fileno(stderr)),"w");
__set_cursor_type(stdout,0);
/*if(isatty(fileno(stdin ))) stdin =freopen("/dev/null","r",stdin );*/
- if(isatty(fileno(stdout))) stdout=freopen("/dev/null","w",stdout);
- if(isatty(fileno(stderr))) stderr=freopen("/dev/null","w",stderr);
+/* if(isatty(fileno(stdout))) stdout=freopen("/dev/null","w",stdout);
+ if(isatty(fileno(stderr))) stderr=freopen("/dev/null","w",stderr);*/
+ if (isatty(1)) close(1), open("/dev/null", O_WRONLY);
+ if (isatty(2)) close(2), open("/dev/null", O_WRONLY);
}
static unsigned hh_int_10_seg;
More information about the MPlayer-users
mailing list