summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-03-16 17:13:57 +0000
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-03-16 17:13:57 +0000
commit701d89533d14c303fa2ba880f2b6b3cc24562f02 (patch)
treeff08276ed15de6f8618279c209ee07827aac44f2 /src
parent46dd1a8031362a79fb790d3020801bbd41ab295a (diff)
downloadxine-lib-701d89533d14c303fa2ba880f2b6b3cc24562f02.tar.gz
xine-lib-701d89533d14c303fa2ba880f2b6b3cc24562f02.tar.bz2
Fix FreeBSD PR 91728 (problem with ioctl() request parameter being unsigned long rather than int). This patch is less invasive and portable.
CVS patchset: 8676 CVS date: 2007/03/16 17:13:57
Diffstat (limited to 'src')
-rw-r--r--src/audio_out/audio_oss_out.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/audio_out/audio_oss_out.c b/src/audio_out/audio_oss_out.c
index ccb142eb5..12a52b997 100644
--- a/src/audio_out/audio_oss_out.c
+++ b/src/audio_out/audio_oss_out.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: audio_oss_out.c,v 1.118 2007/03/09 23:56:42 dgp85 Exp $
+ * $Id: audio_oss_out.c,v 1.119 2007/03/16 17:13:57 dgp85 Exp $
*
* 20-8-2001 First implementation of Audio sync and Audio driver separation.
* Copyright (C) 2001 James Courtier-Dutton James@superbug.demon.co.uk
@@ -115,6 +115,13 @@
#define OSS_SYNC_SOFTSYNC 3
#define OSS_SYNC_PROBEBUFFER 4
+/* On FreeBSD the request type is unsigned long rather than int */
+#ifdef __FreeBSD__
+typedef unsigned long ioctl_request_t;
+#else
+typedef int ioctl_request_t;
+#endif
+
typedef struct oss_driver_s {
ao_driver_t ao_driver;
@@ -525,7 +532,7 @@ static int ao_oss_get_property (ao_driver_t *this_gen, int property) {
if(!this->mixer.mute) {
if(this->mixer.fd != -1) {
- int cmd = 0;
+ ioctl_request_t cmd = 0;
int v;
ioctl(this->mixer.fd, SOUND_MIXER_READ_DEVMASK, &audio_devs);
@@ -564,7 +571,7 @@ static int ao_oss_set_property (ao_driver_t *this_gen, int property, int value)
if(!this->mixer.mute) {
if(this->mixer.fd != -1) {
- int cmd = 0;
+ ioctl_request_t cmd = 0;
int v;
ioctl(this->mixer.fd, SOUND_MIXER_READ_DEVMASK, &audio_devs);
@@ -593,7 +600,7 @@ static int ao_oss_set_property (ao_driver_t *this_gen, int property, int value)
if(this->mixer.mute) {
if(this->mixer.fd != -1) {
- int cmd = 0;
+ ioctl_request_t cmd = 0;
int v = 0;
ioctl(this->mixer.fd, SOUND_MIXER_READ_DEVMASK, &audio_devs);