X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=tools%2Fc_rehash.in;h=26db8999d8c8bf9173c99f5e29b10cfd87bdd3a5;hp=baec7c14ff4308a3062996597f0c27a1dbef54d0;hb=967d95f096e359174bb55733ff1cb56928710b07;hpb=26c7750827a47654d7243b200eb8f07d4559c9f4 diff --git a/tools/c_rehash.in b/tools/c_rehash.in index baec7c14ff..26db8999d8 100644 --- a/tools/c_rehash.in +++ b/tools/c_rehash.in @@ -117,7 +117,12 @@ sub link_hash_cert { } $hash .= ".$suffix"; print "$fname => $hash\n"; - symlink $fname, $hash; + $symlink_exists=eval {symlink("",""); 1}; + if ($symlink_exists) { + symlink $fname, $hash; + } else { + system ("cp", $fname, $hash); + } $hashlist{$hash} = $fprint; } @@ -142,7 +147,12 @@ sub link_hash_crl { } $hash .= ".r$suffix"; print "$fname => $hash\n"; - symlink $fname, $hash; + $symlink_exists=eval {symlink("",""); 1}; + if ($symlink_exists) { + symlink $fname, $hash; + } else { + system ("cp", $fname, $hash); + } $hashlist{$hash} = $fprint; }