From 635283a5dcc470c8dc22d6cabaf1eac4e3e08bf4 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 14 Apr 2009 15:03:39 -0300 Subject: fix backport compilation, when ch9.h file doesn't exist From: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/make_config_compat.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'v4l/scripts') 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 () { 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"; } -- cgit v1.2.3