rust/cargo-c: update to 0.10.7+cargo-0.84.0
[oi-userland.git] / components / python / python37 / patches / 09-ossaudiodev.patch
blob93ffdd845d1cedba5f6cbed2f97572d5c72b3953
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 ifdef'd out. As
3 the patch is Solaris-specific, it is not suitable for upstream.
4 --- Python-3.7.4/setup.py
5 +++ Python-3.7.4/setup.py
6 @@ -1713,7 +1713,7 @@ class PyBuildExt(build_ext):
7 # End multiprocessing
9 # Platform-specific libraries
10 - if host_platform.startswith(('linux', 'freebsd', 'gnukfreebsd')):
11 + if host_platform.startswith(('sunos5', 'linux', 'freebsd', 'gnukfreebsd')):
12 exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
13 else:
14 missing.append('ossaudiodev')
15 --- Python-3.7.4/Modules/ossaudiodev.c
16 +++ Python-3.7.4/Modules/ossaudiodev.c
17 @@ -1213,6 +1213,7 @@ PyInit_ossaudiodev(void)
18 _EXPORT_INT(m, SOUND_MIXER_MONITOR);
19 #endif
21 +#ifndef __sun
22 /* Expose all the ioctl numbers for masochists who like to do this
23 stuff directly. */
24 _EXPORT_INT(m, SNDCTL_COPR_HALT);
25 @@ -1225,6 +1226,7 @@ PyInit_ossaudiodev(void)
26 _EXPORT_INT(m, SNDCTL_COPR_SENDMSG);
27 _EXPORT_INT(m, SNDCTL_COPR_WCODE);
28 _EXPORT_INT(m, SNDCTL_COPR_WDATA);
29 +#endif
30 #ifdef SNDCTL_DSP_BIND_CHANNEL
31 _EXPORT_INT(m, SNDCTL_DSP_BIND_CHANNEL);
32 #endif
33 @@ -1246,8 +1248,12 @@ PyInit_ossaudiodev(void)
34 _EXPORT_INT(m, SNDCTL_DSP_GETSPDIF);
35 #endif
36 _EXPORT_INT(m, SNDCTL_DSP_GETTRIGGER);
37 +#ifdef SNDCTL_DSP_MAPINBUF
38 _EXPORT_INT(m, SNDCTL_DSP_MAPINBUF);
39 +#endif
40 +#ifdef SNDCTL_DSP_MAPOUTBUF
41 _EXPORT_INT(m, SNDCTL_DSP_MAPOUTBUF);
42 +#endif
43 _EXPORT_INT(m, SNDCTL_DSP_NONBLOCK);
44 _EXPORT_INT(m, SNDCTL_DSP_POST);
45 #ifdef SNDCTL_DSP_PROFILE
46 @@ -1267,6 +1273,7 @@ PyInit_ossaudiodev(void)
47 _EXPORT_INT(m, SNDCTL_DSP_STEREO);
48 _EXPORT_INT(m, SNDCTL_DSP_SUBDIVIDE);
49 _EXPORT_INT(m, SNDCTL_DSP_SYNC);
50 +#ifndef __sun
51 _EXPORT_INT(m, SNDCTL_FM_4OP_ENABLE);
52 _EXPORT_INT(m, SNDCTL_FM_LOAD_INSTR);
53 _EXPORT_INT(m, SNDCTL_MIDI_INFO);
54 @@ -1308,5 +1315,6 @@ PyInit_ossaudiodev(void)
55 _EXPORT_INT(m, SNDCTL_TMR_STOP);
56 _EXPORT_INT(m, SNDCTL_TMR_TEMPO);
57 _EXPORT_INT(m, SNDCTL_TMR_TIMEBASE);
58 +#endif
59 return m;