summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDirk von Suchodoletz2009-06-03 21:08:35 +0200
committerDirk von Suchodoletz2009-06-03 21:08:35 +0200
commit4937526cafa58e4f889b8b5258d537687f0f1e7d (patch)
tree12cd21b18a890474a8d813ad03dd01816b961eb5
parent * update svn:ignore (diff)
downloaddnbd-4937526cafa58e4f889b8b5258d537687f0f1e7d.tar.gz
dnbd-4937526cafa58e4f889b8b5258d537687f0f1e7d.tar.xz
dnbd-4937526cafa58e4f889b8b5258d537687f0f1e7d.zip
Compilation quickfix for DNBD kernel module (to be checked if proper
version and proper fix) ... git-svn-id: http://svn.openslx.org/svn/openslx/contrib/dnbd/trunk@2926 95ad53e4-c205-0410-b2fa-d234c58c8868
-rw-r--r--kernel/dnbd.h7
-rw-r--r--kernel/net.h7
-rw-r--r--kernel/queue.h7
3 files changed, 18 insertions, 3 deletions
diff --git a/kernel/dnbd.h b/kernel/dnbd.h
index a744038..1cac03b 100644
--- a/kernel/dnbd.h
+++ b/kernel/dnbd.h
@@ -1,9 +1,14 @@
#ifndef LINUX_DNBD_H
#define LINUX_DNBD_H 1
+#include <linux/version.h>
#include <linux/completion.h>
#include <linux/in.h>
-#include <linux/semaphore.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)
+ #include <asm/semaphore.h>
+#else
+ #include <linux/semaphore.h>
+#endif
#include <linux/blkdev.h>
#include <linux/rbtree.h>
#include <linux/jiffies.h>
diff --git a/kernel/net.h b/kernel/net.h
index 8fad623..989f430 100644
--- a/kernel/net.h
+++ b/kernel/net.h
@@ -1,8 +1,13 @@
#ifndef LINUX_DNBD_NET_H
#define LINUX_DNBD_NET_H 1
+#include <linux/version.h>
#include <linux/spinlock.h>
-#include <linux/semaphore.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)
+ #include <asm/semaphore.h>
+#else
+ #include <linux/semaphore.h>
+#endif
#include <linux/list.h>
#include <linux/param.h>
#include <linux/jiffies.h>
diff --git a/kernel/queue.h b/kernel/queue.h
index 287965b..4a5e653 100644
--- a/kernel/queue.h
+++ b/kernel/queue.h
@@ -1,8 +1,13 @@
#ifndef LINUX_DNBD_QUEUE_H
#define LINUX_DNBD_QUEUE_H 1
+#include <linux/version.h>
#include <linux/spinlock.h>
-#include <linux/semaphore.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)
+ #include <asm/semaphore.h>
+#else
+ #include <linux/semaphore.h>
+#endif
#include <linux/list.h>
#include <linux/wait.h>