summaryrefslogtreecommitdiff
path: root/v4l
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-04-14 15:03:39 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-04-14 15:03:39 -0300
commit635283a5dcc470c8dc22d6cabaf1eac4e3e08bf4 (patch)
tree3975249becb19cdff9159010e3576fbb70d4935a /v4l
parent776d750f59e78cf1a3e0ab50c87d720b151d3af2 (diff)
downloadmediapointer-dvb-s2-635283a5dcc470c8dc22d6cabaf1eac4e3e08bf4.tar.gz
mediapointer-dvb-s2-635283a5dcc470c8dc22d6cabaf1eac4e3e08bf4.tar.bz2
fix backport compilation, when ch9.h file doesn't exist
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
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";
}