[MPlayer-dev-eng] [PATCH] Trivial, Linux DevFS/RTC compatibilty

Robert Cardell rbt at mtlb.co.uk
Sun Sep 29 20:10:35 CEST 2002


Hi all,

The patch below causes MPlayer to look for the RTC device at /dev/misc/rtc
(the default devfs location) as well as /dev/rtc. Patch is against 0.90-pre8.
I'm not on the list, cc me to reply. (Or forcibly subscribe me :)

Rob.
<rbt at mtlb.co.uk>

--- MPlayer-0.90pre8/mplayer.c	2002-09-16 17:53:25.000000000 +0100
+++ MPlayer-0.90pre8-devfs/mplayer.c	2002-09-24 16:03:04.000000000 +0100
@@ -701,8 +701,12 @@
 #ifdef HAVE_RTC
   if(!nortc)
   {
-    if ((rtc_fd = open("/dev/rtc", O_RDONLY)) < 0)
-	mp_msg(MSGT_CPLAYER, MSGL_ERR, "Linux RTC init error: %s\n", strerror(errno));
+    rtc_fd = open("/dev/rtc", O_RDONLY);
+    if ( rtc_fd < 0 )
+        rtc_fd = open("/dev/misc/rtc", O_RDONLY);
+
+    if ( rtc_fd < 0 )
+	    mp_msg(MSGT_CPLAYER, MSGL_ERR, "Linux RTC init error: %s\n", strerror(errno));
     else {
 	unsigned long irqp;
 



More information about the MPlayer-dev-eng mailing list