summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Oberritter <devnull@localhost>2003-10-08 23:17:25 +0000
committerAndreas Oberritter <devnull@localhost>2003-10-08 23:17:25 +0000
commit108581fa0f78b19b9c83e5d54aa823532c2c1ef5 (patch)
treee3fba988ea20c49306522d6fee98947695368f25
parent211cbd901aa45d1e325986fb9709ea774c4f29f7 (diff)
downloadmediapointer-dvb-s2-108581fa0f78b19b9c83e5d54aa823532c2c1ef5.tar.gz
mediapointer-dvb-s2-108581fa0f78b19b9c83e5d54aa823532c2c1ef5.tar.bz2
avoid "redefinition of bla bla" errors when building with patched kernels
(e.g. mtd cvs)
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_compat.h26
1 files changed, 17 insertions, 9 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_compat.h b/linux/drivers/media/dvb/dvb-core/dvb_compat.h
index b6c1c7bc8..3d865c6f1 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_compat.h
+++ b/linux/drivers/media/dvb/dvb-core/dvb_compat.h
@@ -95,15 +95,23 @@ extern struct page * vmalloc_to_page(void *addr);
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-#include <linux/tqueue.h>
-#define work_struct tq_struct
-#define INIT_WORK(wq,routine,data) INIT_TQUEUE(wq,routine,data)
-#define schedule_work(wq) schedule_task(wq)
-#define flush_scheduled_work() flush_scheduled_tasks()
-#else
-#include <linux/workqueue.h>
-#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+#include <linux/tqueue.h>
+#ifndef work_struct
+#define work_struct tq_struct
+#endif
+#ifndef INIT_WORK
+#define INIT_WORK(wq,routine,data) INIT_TQUEUE(wq,routine,data)
+#endif
+#ifndef schedule_work
+#define schedule_work(wq) schedule_task(wq)
+#endif
+#ifndef flush_scheduled_work
+#define flush_scheduled_work() flush_scheduled_tasks()
+#endif
+#else
+#include <linux/workqueue.h>
+#endif
#endif