summaryrefslogtreecommitdiff
path: root/audio/xmms-fmradio/patches/patch-ad
diff options
context:
space:
mode:
Diffstat (limited to 'audio/xmms-fmradio/patches/patch-ad')
-rw-r--r--audio/xmms-fmradio/patches/patch-ad78
1 files changed, 78 insertions, 0 deletions
diff --git a/audio/xmms-fmradio/patches/patch-ad b/audio/xmms-fmradio/patches/patch-ad
new file mode 100644
index 00000000000..c8fab574c54
--- /dev/null
+++ b/audio/xmms-fmradio/patches/patch-ad
@@ -0,0 +1,78 @@
+$NetBSD: patch-ad,v 1.1.1.1 2002/01/06 06:50:35 jmcneill Exp $
+
+--- radio_file_info.c.orig Sun Jan 6 02:36:53 2002
++++ radio_file_info.c Sun Jan 6 02:38:25 2002
+@@ -163,7 +163,7 @@
+ tuned = ((v.signal != 0) ? TRUE : FALSE);
+ close(radio_fd);
+ radio_fd = -2;
+-#elif defined __OpenBSD__
++#elif defined(__OpenBSD__) || defined(__NetBSD__)
+ ri.freq = freq;
+ ri.volume = volume * (255 / (FMR_VOL_MAX - FMR_VOL_MIN));
+ ri.mute = is_paused ? 1 : 0;
+@@ -171,7 +171,7 @@
+ usleep(50000);
+ SetGetRadioInfo(GET_INFO);
+ tuned = ri.info ? TRUE : FALSE;
+-#endif /* linux || __OpenBSD__ */
++#endif /* linux || __OpenBSD__ || __NetBSD__ */
+ }
+
+ static void scan_cb(GtkWidget * sb, gpointer data){
+@@ -205,12 +205,12 @@
+ va.flags = VIDEO_AUDIO_VOLUME|(is_paused ? VIDEO_AUDIO_MUTE : 0);
+ ioctl (radio_fd, VIDIOCSFREQ, &xl_freq);
+ ioctl (radio_fd, VIDIOCSAUDIO, &va);
+-#elif defined __OpenBSD__
++#elif defined(__OpenBSD__) || defined(__NetBSD__)
+ ri.freq = fr;
+ ri.volume = volume * (255/(FMR_VOL_MAX-FMR_VOL_MIN));
+ ri.mute = is_paused ? 1 : 0;
+ SetGetRadioInfo(SET_INFO);
+-#endif /* linux || __OpenBSD__ */
++#endif /* linux || __OpenBSD__ || __NetBSD__ */
+
+ for(i=0;(i<tries)&&(tuned);i++){
+ usleep (10000);
+@@ -218,10 +218,10 @@
+ v.tuner = 0;
+ ioctl (radio_fd, VIDIOCGTUNER, &v);
+ tuned = ((v.signal != 0) ? TRUE : FALSE);
+-#elif defined __OpenBSD__
++#elif defined(__OpenBSD__) || defined(__NetBSD__)
+ SetGetRadioInfo(GET_INFO);
+ tuned = ri.info & (RADIO_INFO_SIGNAL | RADIO_INFO_STEREO) ? 1 : 0;
+-#endif /* linux || __OpenBSD__ */
++#endif /* linux || __OpenBSD__ || __NetBSD__ */
+ }
+ }
+
+@@ -236,12 +236,12 @@
+ va.flags = VIDEO_AUDIO_VOLUME|(is_paused ? VIDEO_AUDIO_MUTE : 0);
+ ioctl (radio_fd, VIDIOCSFREQ, &xl_freq);
+ ioctl (radio_fd, VIDIOCSAUDIO, &va);
+-#elif defined __OpenBSD__
++#elif defined(__OpenBSD__) || defined(__NetBSD__)
+ ri.freq = fr;
+ ri.volume = volume * (255/(FMR_VOL_MAX-FMR_VOL_MIN));
+ ri.mute = is_paused ? 1 : 0;
+ SetGetRadioInfo(SET_INFO);
+-#endif /* linux || __OpenBSD__ */
++#endif /* linux || __OpenBSD__ || __NetBSD__ */
+
+ for(i=0;(i<tries)&&(!tuned);i++){
+ usleep (10000);
+@@ -249,10 +249,10 @@
+ v.tuner = 0;
+ ioctl (radio_fd, VIDIOCGTUNER, &v);
+ tuned = ((v.signal != 0) ? TRUE : FALSE);
+-#elif defined __OpenBSD__
++#elif defined(__OpenBSD__) || defined(__NetBSD__)
+ SetGetRadioInfo(GET_INFO);
+ tuned = ri.info & (RADIO_INFO_SIGNAL | RADIO_INFO_STEREO) ? 1 : 0;
+-#endif /* linux || __OpenBSD__ */
++#endif /* linux || __OpenBSD__ || __NetBSD__ */
+ }
+ }
+ }