diff --git a/scripts/checksrc.pl b/scripts/checksrc.pl index 34664585c5..76f4660816 100755 --- a/scripts/checksrc.pl +++ b/scripts/checksrc.pl @@ -403,6 +403,13 @@ sub scanfile { checksrc($cmd, $line, $file, $l) } + if($l =~ /^#line (\d+) \"([^\"]*)\"/) { + # a #line instruction + $file = $2; + $line = $1; + next; + } + # check for a copyright statement and save the years if($l =~ /\* +copyright .* (\d\d\d\d|)/i) { my $count = 0;