slackbuilds_ponce/audio/oss/oss-v4.2-linux-4.0.patch
Xylemon eda5f68048 audio/oss: Updated for version 4.2.2011.
Patched for building with gcc-5.3.0 and linux-4.1.15.
2016-01-17 09:40:16 +07:00

41 lines
1.5 KiB
Diff

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