diff options
-rwxr-xr-x | source4/script/mkproto.pl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/script/mkproto.pl b/source4/script/mkproto.pl index 5aeece7155..87a68e33fa 100755 --- a/source4/script/mkproto.pl +++ b/source4/script/mkproto.pl @@ -157,7 +157,9 @@ sub process_file($$$) $filename =~ s/\.o$/\.c/g; - if (!open(FH, "< $builddir/$filename")) { + if ($filename =~ /^\//) { + open(FH, "<$filename") or die("Failed to open $filename"); + } elsif (!open(FH, "< $builddir/$filename")) { open(FH, "< $srcdir/$filename") || die "Failed to open $filename"; } |