aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/tools/msvc/Mkvcbuild.pm12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm
index 7954773c052..2160e4d096d 100644
--- a/src/tools/msvc/Mkvcbuild.pm
+++ b/src/tools/msvc/Mkvcbuild.pm
@@ -129,6 +129,18 @@ sub mkvcbuild
}
}
+ # Perl versions before 5.13.4 don't provide -D_USE_32BIT_TIME_T
+ # regardless of how they were built. On 32-bit Windows, assume
+ # such a version was built with a pre-MSVC-2005 compiler, and
+ # define the symbol anyway, so that we are compatible if we're
+ # being built with a later MSVC version.
+ push(@perl_embed_ccflags, '_USE_32BIT_TIME_T')
+ if $solution->{platform} eq 'Win32'
+ && $Config{PERL_REVISION} == 5
+ && ($Config{PERL_VERSION} < 13
+ || ( $Config{PERL_VERSION} == 13
+ && $Config{PERL_SUBVERSION} < 4));
+
# Also, a hack to prevent duplicate definitions of uid_t/gid_t
push(@perl_embed_ccflags, 'PLPERL_HAVE_UID_GID');