1 This patch is needed to make Python understand it can build the OSS plugin.
2 Some OSS ioctls are not supported on Solaris, so they are commented out.
4 --- Python-2.7.3/Modules/ossaudiodev.c-orig 2012-12-20 12:26:23.028233427 -0600
5 +++ Python-2.7.3/Modules/ossaudiodev.c 2012-12-20 12:26:33.130986175 -0600
6 @@ -1044,6 +1044,7 @@ initossaudiodev(void)
7 _EXPORT_INT(m, SOUND_MIXER_MONITOR);
11 /* Expose all the ioctl numbers for masochists who like to do this
13 _EXPORT_INT(m, SNDCTL_COPR_HALT);
14 @@ -1056,6 +1057,7 @@ initossaudiodev(void)
15 _EXPORT_INT(m, SNDCTL_COPR_SENDMSG);
16 _EXPORT_INT(m, SNDCTL_COPR_WCODE);
17 _EXPORT_INT(m, SNDCTL_COPR_WDATA);
19 #ifdef SNDCTL_DSP_BIND_CHANNEL
20 _EXPORT_INT(m, SNDCTL_DSP_BIND_CHANNEL);
22 @@ -1077,8 +1079,12 @@ initossaudiodev(void)
23 _EXPORT_INT(m, SNDCTL_DSP_GETSPDIF);
25 _EXPORT_INT(m, SNDCTL_DSP_GETTRIGGER);
26 +#ifdef SNDCTL_DSP_MAPINBUF
27 _EXPORT_INT(m, SNDCTL_DSP_MAPINBUF);
29 +#ifdef SNDCTL_DSP_MAPOUTBUF
30 _EXPORT_INT(m, SNDCTL_DSP_MAPOUTBUF);
32 _EXPORT_INT(m, SNDCTL_DSP_NONBLOCK);
33 _EXPORT_INT(m, SNDCTL_DSP_POST);
34 #ifdef SNDCTL_DSP_PROFILE
35 @@ -1098,6 +1104,7 @@ initossaudiodev(void)
36 _EXPORT_INT(m, SNDCTL_DSP_STEREO);
37 _EXPORT_INT(m, SNDCTL_DSP_SUBDIVIDE);
38 _EXPORT_INT(m, SNDCTL_DSP_SYNC);
40 _EXPORT_INT(m, SNDCTL_FM_4OP_ENABLE);
41 _EXPORT_INT(m, SNDCTL_FM_LOAD_INSTR);
42 _EXPORT_INT(m, SNDCTL_MIDI_INFO);
43 @@ -1139,4 +1146,5 @@ initossaudiodev(void)
44 _EXPORT_INT(m, SNDCTL_TMR_STOP);
45 _EXPORT_INT(m, SNDCTL_TMR_TEMPO);
46 _EXPORT_INT(m, SNDCTL_TMR_TIMEBASE);
49 --- Python-2.7.6/setup.py.~5~ 2014-05-14 13:37:59.287142508 -0700
50 +++ Python-2.7.6/setup.py 2014-05-14 13:40:01.472280298 -0700
53 missing.append('linuxaudiodev')
55 - if (host_platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
56 - 'freebsd7', 'freebsd8')
57 + if (host_platform in ('sunos5', 'linux2', 'freebsd4', 'freebsd5',
58 + 'freebsd6', 'freebsd7', 'freebsd8')
59 or host_platform.startswith("gnukfreebsd")):
60 exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )