From 108581fa0f78b19b9c83e5d54aa823532c2c1ef5 Mon Sep 17 00:00:00 2001 From: Andreas Oberritter Date: Wed, 8 Oct 2003 23:17:25 +0000 Subject: avoid "redefinition of bla bla" errors when building with patched kernels (e.g. mtd cvs) --- linux/drivers/media/dvb/dvb-core/dvb_compat.h | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'linux') 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 -#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 -#endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) +#include +#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 +#endif #endif -- cgit v1.2.3