blob: 7bc4ea36d76056888330777f7eb216d00acd5a67 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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
|