summaryrefslogtreecommitdiff
path: root/v4l/scripts/make_config_compat.pl
diff options
context:
space:
mode:
Diffstat (limited to 'v4l/scripts/make_config_compat.pl')
-rwxr-xr-xv4l/scripts/make_config_compat.pl23
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