diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-04-14 11:27:26 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-04-14 11:27:26 -0300 |
commit | 8cc78392269a77c3aed220bb457e991924480779 (patch) | |
tree | e591a1fce7ed68998bc896124524767e9cea3ee5 /v4l/scripts | |
parent | d54ae5db8294db9af22f394d69591b8cf500ddc8 (diff) | |
download | mediapointer-dvb-s2-8cc78392269a77c3aed220bb457e991924480779.tar.gz mediapointer-dvb-s2-8cc78392269a77c3aed220bb457e991924480779.tar.bz2 |
compat.h: improve detection for need poll_schedule()
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Priority: normal
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'v4l/scripts')
-rwxr-xr-x | v4l/scripts/make_config_compat.pl | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/v4l/scripts/make_config_compat.pl b/v4l/scripts/make_config_compat.pl index e94bf2803..32b111f4e 100755 --- a/v4l/scripts/make_config_compat.pl +++ b/v4l/scripts/make_config_compat.pl @@ -274,6 +274,28 @@ sub check_snd_card_create() close IN; } +sub check_poll_schedule() +{ + + + my @files = ( "$kdir//include/linux/poll.h" ); + + foreach my $file ( @files ) { + open IN, "<$file" or die "File not found: $file"; + while (<IN>) { + if (m/poll_schedule/) { + close IN; + # definition found. No need for compat + return; + } + } + close IN; + } + + # definition not found. This means that we need compat + $out.= "\n#define NEED_POLL_SCHEDULE 1\n"; +} + sub check_other_dependencies() { check_spin_lock(); @@ -290,6 +312,7 @@ sub check_other_dependencies() check_usb_endpoint_type(); check_pci_ioremap_bar(); check_snd_card_create(); + check_poll_schedule(); } # Do the basic rules |