From: <dg...@us...> - 2007-03-16 17:14:02
|
Update of /cvsroot/xine/xine-lib/src/audio_out In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv28351 Modified Files: audio_oss_out.c Log Message: Fix FreeBSD PR 91728 (problem with ioctl() request parameter being unsigned long rather than int). This patch is less invasive and portable. Index: audio_oss_out.c =================================================================== RCS file: /cvsroot/xine/xine-lib/src/audio_out/audio_oss_out.c,v retrieving revision 1.118 retrieving revision 1.119 diff -u -r1.118 -r1.119 --- audio_oss_out.c 9 Mar 2007 23:56:42 -0000 1.118 +++ audio_oss_out.c 16 Mar 2007 17:13:57 -0000 1.119 @@ -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 @@ 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 @@ 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 @@ 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); |