From d082b862b623972e2115326f76612aa40b35c588 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 23 Jun 2009 21:11:47 -0300 Subject: Building system: Improve compatibility for delayed work From: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/make_config_compat.pl | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'v4l/scripts/make_config_compat.pl') diff --git a/v4l/scripts/make_config_compat.pl b/v4l/scripts/make_config_compat.pl index 7c7841459..1f5b8bae6 100755 --- a/v4l/scripts/make_config_compat.pl +++ b/v4l/scripts/make_config_compat.pl @@ -338,6 +338,26 @@ sub check_bitops() $out.= "\n#define NEED_BITOPS 1\n"; } +sub check_delayed_work() +{ + my @files = ( "$kdir//include/linux/workqueue.h" ); + + foreach my $file ( @files ) { + open IN, "<$file" or die "File not found: $file"; + while () { + if (m/struct\s+delayed_work/) { + close IN; + # definition found. No need for compat + return; + } + } + close IN; + } + + # definition not found. This means that we need compat + $out.= "\n#define NEED_DELAYED_WORK 1\n"; +} + sub check_other_dependencies() { check_spin_lock(); @@ -357,6 +377,7 @@ sub check_other_dependencies() check_poll_schedule(); check_snd_BUG_ON(); check_bitops(); + check_delayed_work(); } # Do the basic rules -- cgit v1.2.3