Skip to contentSkip to conversation

Make kqemu compile with kernel 2.6.37

PATCH New xtof pernod 1 participant 1 message Jan 22, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Make kqemu compile with kernel 2.6.37

Hello,

For those who still use kqemu (not all cpu's support kvm;), here is a small patch that re-enable the init_MUTEX() macro, whose removal was planed in 2009: see https://lkml.org/lkml/2009/7/26/10

---

kqemu-linux.c 2011-01-20 19:44:20.431688004 +0100 renamed from kqemu-linux.c.ORG 2009-05-31 00:34:10.000000000 +0200 +4 -0
diff -up kqemu/kqemu-linux.c.ORG kqemu/kqemu-linux.c
@@ -26,6 +27,7 @@
 #include <linux/ioctl.h>
 #include <linux/smp_lock.h>
 #include <linux/miscdevice.h>
+#include <linux/semaphore.h>
 #include <asm/atomic.h>
 #include <asm/processor.h>
 #include <asm/uaccess.h>
@@ -60,6 +62,10 @@ int lock_count;
 int page_alloc_count;
 #endif
 
+#ifndef init_MUTEX
+#define init_MUTEX(sem)         sema_init(sem, 1)
+#endif
 
 
 
Signature · 1 line
XtoF.