diff options
author | 2012-06-24 20:56:57 +0000 | |
---|---|---|
committer | 2012-06-24 20:56:57 +0000 | |
commit | 78739abdddb8c41dca5c33ac157288d9aed344c8 (patch) | |
tree | 3839e9dde4df17c3735ae3ceb9607e15261d0019 | |
parent | Code for the external L2 cache controller on Indy/Indigo2 R4600SC and Indy (diff) | |
download | wireguard-openbsd-78739abdddb8c41dca5c33ac157288d9aed344c8.tar.xz wireguard-openbsd-78739abdddb8c41dca5c33ac157288d9aed344c8.zip |
work-around for obvious race condition with make -j4.
problem discovered by matthieu@.
This is only a stop-gap work-around !
the real fix is a wee little bit more complex...
-rwxr-xr-x | usr.bin/libtool/libtool | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/usr.bin/libtool/libtool b/usr.bin/libtool/libtool index 4716272bae3..1a271b7af52 100755 --- a/usr.bin/libtool/libtool +++ b/usr.bin/libtool/libtool @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $OpenBSD: libtool,v 1.3 2012/06/24 13:44:53 espie Exp $ +# $OpenBSD: libtool,v 1.4 2012/06/24 20:56:57 espie Exp $ # Copyright (c) 2007-2010 Steven Mestdagh <steven@openbsd.org> # @@ -224,9 +224,13 @@ sub create_symlinks push @$libnames, basename($f); } foreach my $libfile (@$libnames) { - LT::Trace::debug {"ln -s $f $dir/$libfile\n"}; - if (! -f "$dir/$libfile") { - symlink abs_path($f), "$dir/$libfile" or die "Cannot create symlink: $!\n"; + my $link = "$dir/$libfile"; + LT::Trace::debug {"ln -s $f $link\n"}; + if (! -f $link) { + my $p = abs_path($f); + if (!symlink($p, $link)) { + die "Cannot create symlink($p, $link): $!\n" unless $!{EEXIST}; + } } } } |