Commit 5ff30209d5 for openssl.org

commit 5ff30209d5fb2df85f1896d039b58551980e0c45
Author: Bob Beck <beck@openssl.org>
Date:   Wed Sep 2 10:51:57 2026 -0600

    copyright.pm: spell the null device the platform's way

    year_of() runs git through the platform shell with "2>/dev/null".
    Under cmd.exe that is a redirect into a nonexistent \dev directory,
    so every generator run printed "The system cannot find the path
    specified." twice and the copyright year silently fell back to the
    current year.  Use File::Spec->devnull() instead.

    Reviewed-by: Neil Horman <nhorman@openssl.org>
    Reviewed-by: Andrew Dinh <andrewd@openssl.org>
    Merge-date: Mon Sep  7 18:21:29 2026
    Merged-from: https://github.com/openssl/openssl/pull/32648

diff --git a/util/perl/OpenSSL/copyright.pm b/util/perl/OpenSSL/copyright.pm
index 21daf5bb45..5a449139c8 100644
--- a/util/perl/OpenSSL/copyright.pm
+++ b/util/perl/OpenSSL/copyright.pm
@@ -8,6 +8,7 @@

 use strict;
 use warnings;
+use File::Spec;

 package OpenSSL::copyright;

@@ -27,8 +28,9 @@ sub year_of {
     my $YEAR = [localtime()]->[5] + 1900;

     # See if git's available
+    my $devnull = File::Spec->devnull();
     open my $FH,
-       "git log -1 --date=short --format=format:%cd $file 2>/dev/null|"
+       "git log -1 --date=short --format=format:%cd $file 2>$devnull|"
            or return $YEAR;
     my $LINE = <$FH> // '';
     close $FH;