# HG changeset patch # User diego # Date 1104970016 0 # Node ID dc7b86065e3cbe7d4a2b7ef78c15e510c93d8fbf # Parent 33926e25fda22ba3796697533d27513218ca63c4 RTC support on FreeBSD, inspired by a patch from Michael Johnson and Reimar Dffinger. diff -r 33926e25fda2 -r dc7b86065e3c configure --- a/configure Wed Jan 05 23:58:14 2005 +0000 +++ b/configure Thu Jan 06 00:06:56 2005 +0000 @@ -5024,8 +5024,13 @@ if test "$_rtc" = auto ; then cat > $TMPC << EOF #include +#ifdef __linux__ #include -int main(void) { return RTC_IRQP_READ; } +#else +#include +#define RTC_PIE_ON RTCIO_PIE_ON +#endif +int main(void) { return RTC_PIE_ON; } EOF _rtc=no cc_check && _rtc=yes @@ -5033,7 +5038,7 @@ echores "$_rtc" else _rtc=no - echores "no (Linux specific feature)" + echores "no" fi if test "$_rtc" = yes ; then _def_rtc='#define HAVE_RTC 1' @@ -6959,7 +6964,7 @@ /* define this to use nl_langinfo function */ $_def_langinfo -/* define this to use RTC (/dev/rtc) for video timers (LINUX only) */ +/* define this to use RTC (/dev/rtc) for video timers */ $_def_rtc /* set up max. outburst. use 65536 for ALSA 0.5, for others 16384 is enough */ diff -r 33926e25fda2 -r dc7b86065e3c mplayer.c --- a/mplayer.c Wed Jan 05 23:58:14 2005 +0000 +++ b/mplayer.c Thu Jan 06 00:06:56 2005 +0000 @@ -92,7 +92,13 @@ #define ROUND(x) ((int)((x)<0 ? (x)-0.5 : (x)+0.5)) #ifdef HAVE_RTC +#ifdef __linux__ #include +#else +#include +#define RTC_IRQP_SET RTCIO_IRQP_SET +#define RTC_PIE_ON RTCIO_PIE_ON +#endif #endif #ifdef USE_TV