--- cfg-mplayer.h	2003-12-23 23:08:50.325175200 +0000
+++ cfg-mplayer.h	2003-12-23 23:10:08.010365256 +0000
@@ -409,6 +409,7 @@
 	{"softsleep", &softsleep, CONF_TYPE_FLAG, 0, 0, 1, NULL},
 #ifdef HAVE_RTC
 	{"nortc", &nortc, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+        {"rtc", &rtc_device, CONF_TYPE_STRING, 0, 0, 0, NULL},
 #endif
 
 	{"slave", &slave_mode, CONF_TYPE_FLAG,CONF_GLOBAL , 0, 1, NULL},
--- mplayer.c	2003-12-23 23:08:38.344996464 +0000
+++ mplayer.c	2003-12-24 00:02:31.601466768 +0000
@@ -337,6 +337,7 @@
 
 #ifdef HAVE_RTC
 static int nortc;
+static char* rtc_device;
 #endif
 
 #ifdef USE_EDL
@@ -1084,9 +1085,15 @@
 #ifdef HAVE_RTC
   if(!nortc)
   {
+    static char* rtc_dev = "/dev/rtc";
+
+    if (rtc_device) {
+	rtc_dev = rtc_device;
+    }
+
     // seteuid(0); /* Can't hurt to try to get root here */
-    if ((rtc_fd = open("/dev/rtc", O_RDONLY)) < 0)
-	mp_msg(MSGT_CPLAYER, MSGL_WARN, "Failed to open /dev/rtc: %s (mplayer should be setuid root or /dev/rtc should be readable by the user.)\n", strerror(errno));
+    if ((rtc_fd = open(rtc_dev, O_RDONLY)) < 0)
+	mp_msg(MSGT_CPLAYER, MSGL_WARN, "Failed to open %s: %s (mplayer should be setuid root or %s should be readable by the user.)\n", rtc_dev, strerror(errno), rtc_dev);
      else {
 	unsigned long irqp = 1024; /* 512 seemed OK. 128 is jerky. */
 

