aboutsummaryrefslogtreecommitdiff
path: root/audio/oss/oss-v4.2-linux-4.0.patch
diff options
context:
space:
mode:
authorXylemon <xylem2020@gmail.com>2016-01-10 16:15:09 +0000
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-01-17 09:40:16 +0700
commiteda5f68048067523058cb26ba8f82c6456cd6943 (patch)
treed54cd7bf2353078ee4cf7fcf74531d121a37285e /audio/oss/oss-v4.2-linux-4.0.patch
parente3f2febfed6b6f58db28aebd07b31f41a28d1a22 (diff)
audio/oss: Updated for version 4.2.2011.
Patched for building with gcc-5.3.0 and linux-4.1.15.
Diffstat (limited to 'audio/oss/oss-v4.2-linux-4.0.patch')
-rw-r--r--audio/oss/oss-v4.2-linux-4.0.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/audio/oss/oss-v4.2-linux-4.0.patch b/audio/oss/oss-v4.2-linux-4.0.patch
new file mode 100644
index 0000000000000..7bc4ea36d7605
--- /dev/null
+++ b/audio/oss/oss-v4.2-linux-4.0.patch
@@ -0,0 +1,41 @@
+diff -durN oss-v4.2-build2011-src-gpl/setup/Linux/oss/build/osscore.c oss-v4.2-build2011-src-gpl-patched/setup/Linux/oss/build/osscore.c
+--- oss-v4.2-build2011-src-gpl/setup/Linux/oss/build/osscore.c 2014-09-04 00:15:31.000000000 +0200
++++ oss-v4.2-build2011-src-gpl-patched/setup/Linux/oss/build/osscore.c 2015-04-25 23:16:19.502116503 +0200
+@@ -1950,8 +1950,13 @@
+ }
+ else
+ {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)
+ flags[1] = read_cr4 ();
+ write_cr4 (flags[1] | 0x600); /* Set OSFXSR & OSXMMEXCEPT */
++#else
++ flags[1] = __read_cr4 ();
++ __write_cr4 (flags[1] | 0x600); /* Set OSFXSR & OSXMMEXCEPT */
++#endif
+ FX_SAVE (envbuf);
+ asm ("fninit");
+ asm ("fwait");
+@@ -1971,7 +1976,11 @@
+ else
+ {
+ FX_RESTORE (envbuf);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)
+ write_cr4 (flags[1]); /* Restore cr4 */
++#else
++ __write_cr4 (flags[1]); /* Restore cr4 */
++#endif
+ }
+ write_cr0 (flags[0]); /* Restore cr0 */
+ }
+diff -durN oss-v4.2-build2011-src-gpl/setup/setupdir.sh oss-v4.2-build2011-src-gpl-patched/setup/setupdir.sh
+--- oss-v4.2-build2011-src-gpl/setup/setupdir.sh 2015-04-25 23:03:34.173985609 +0200
++++ oss-v4.2-build2011-src-gpl-patched/setup/setupdir.sh 2015-04-25 23:03:14.267351737 +0200
+@@ -36,7 +36,7 @@
+ # Use Linux24 as the OS name for Linux 2.4.x
+ if test "$OS " = "Linux "
+ then
+- if test "`uname -r|sed 's/2.//'|sed 's/\..*//'` " = "4 "
++ if test "`uname -r | cut -d '.' -f 1-2` " = "2.4 "
+ then
+ OS=Linux24
+ fi