Sisyphus repository
Last update: 24 march 2019 | SRPMs: 17646 | Visits: 13266384
en ru br
ALT Linux repos
S:5.2.26-alt2
5.0: 3.0.4-alt0.M50.1
4.1: 2.1.4-alt0.M41.5
4.0:
+backports:1.6.6-alt0.M40.2

Group :: Emulators
RPM: virtualbox

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: vbox-2.6.25.diff
Download


--- a/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
+++ b/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
@@ -225,11 +225,21 @@ DECLINLINE(unsigned long) msecs_to_jiffi
 #undef bool
 
 /*
- * There are post-2.6.24 kernels (confusingly with unchanged version number)
- * which eliminate macros which were marked as deprecated.
+ * The 2.6.25 kernel eliminates macros that were marked as deprecated and eliminates
+ * routine change_page_attr() in favor of the set_pages_* API.
  */
-#ifndef __attribute_used__
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
 #define __attribute_used__ __used
+
+static inline int my_change_page_attr(struct page *page, int numpages, pgprot_t prot)
+{
+	/* use the set_pages_* API */
+	if (pgprot_val(prot) & _PAGE_NX)
+		set_pages_nx(page, numpages);
+	set_pages_uc(page, numpages);
+	return 0;
+}
+#define change_page_attr(a,b,c) my_change_page_attr((a), (b), (c))
 #endif
 
 #endif
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin