From 701d89533d14c303fa2ba880f2b6b3cc24562f02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Fri, 16 Mar 2007 17:13:57 +0000 Subject: 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 --- src/audio_out/audio_oss_out.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src') 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); -- cgit v1.2.3