summaryrefslogtreecommitdiff
path: root/source4/script/mkproto.pl
diff options
context:
space:
mode:
Diffstat (limited to 'source4/script/mkproto.pl')
-rwxr-xr-xsource4/script/mkproto.pl4
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/script/mkproto.pl b/source4/script/mkproto.pl
index 3ed845e2bb..d1f8f886f6 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";
}