summaryrefslogtreecommitdiff
path: root/v4l
diff options
context:
space:
mode:
Diffstat (limited to 'v4l')
-rwxr-xr-xv4l/scripts/make_config_compat.pl6
1 files changed, 5 insertions, 1 deletions
diff --git a/v4l/scripts/make_config_compat.pl b/v4l/scripts/make_config_compat.pl
index 32b111f4e..3c2b623ca 100755
--- a/v4l/scripts/make_config_compat.pl
+++ b/v4l/scripts/make_config_compat.pl
@@ -218,10 +218,12 @@ sub check_net_dev()
sub check_usb_endpoint_type()
{
+ my $nfiles = 0;
my @files = ( "$kdir/include/linux/usb.h", "$kdir/include/linux/usb/ch9.h" );
foreach my $file ( @files ) {
- open IN, "<$file" or die "File not found: $file";
+ open IN, "<$file" or next;
+ $nfiles++;
while (<IN>) {
if (m/usb_endpoint_type/) {
close IN;
@@ -232,6 +234,8 @@ sub check_usb_endpoint_type()
close IN;
}
+ die "Usb headers not found" if (!$nfiles);
+
# definition not found. This means that we need compat
$out.= "\n#define NEED_USB_ENDPOINT_TYPE 1\n";
}