gst-libav1: update to 1.24.11
[oi-userland.git] / components / python / python39 / patches / 09-ossaudiodev.patch
blob5a19086369854594c0ed9955669ef9d45381a176
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.9.1/setup.py
5 +++ Python-3.9.1/setup.py
6 @@ -1601,7 +1601,7 @@ class PyBuildExt(build_ext):
7 self.missing.extend(['resource', 'termios'])
9 # Platform-specific libraries
10 - if HOST_PLATFORM.startswith(('linux', 'freebsd', 'gnukfreebsd')):
11 + if HOST_PLATFORM.startswith(('sunos5', 'linux', 'freebsd', 'gnukfreebsd')):
12 self.add(Extension('ossaudiodev', ['ossaudiodev.c']))
13 elif not AIX:
14 self.missing.append('ossaudiodev')
15 --- Python-3.9.1/Modules/ossaudiodev.c
16 +++ Python-3.9.1/Modules/ossaudiodev.c
17 @@ -1210,6 +1210,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 @@ -1222,6 +1223,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 @@ -1264,6 +1270,7 @@ PyInit_ossaudiodev(void)
34 _EXPORT_INT(m, SNDCTL_DSP_STEREO);
35 _EXPORT_INT(m, SNDCTL_DSP_SUBDIVIDE);
36 _EXPORT_INT(m, SNDCTL_DSP_SYNC);
37 +#ifndef __sun
38 _EXPORT_INT(m, SNDCTL_FM_4OP_ENABLE);
39 _EXPORT_INT(m, SNDCTL_FM_LOAD_INSTR);
40 _EXPORT_INT(m, SNDCTL_MIDI_INFO);
41 @@ -1305,5 +1312,6 @@ PyInit_ossaudiodev(void)
42 _EXPORT_INT(m, SNDCTL_TMR_STOP);
43 _EXPORT_INT(m, SNDCTL_TMR_TEMPO);
44 _EXPORT_INT(m, SNDCTL_TMR_TIMEBASE);
45 +#endif
46 return m;