This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
various: timespec/timeval.tv_sec is time_t, not long, according to POSIX
[perl5.git] / pp_sys.c
index cd420b1..2ba0642 100644 (file)
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -1228,7 +1228,7 @@ PP_wrapped(pp_sselect, 4, 0)
         value = SvNV_nomg(sv);
         if (value < 0.0)
             value = 0.0;
-        timebuf.tv_sec = (long)value;
+        timebuf.tv_sec = (time_t)value;
         value -= (NV)timebuf.tv_sec;
         timebuf.tv_usec = (long)(value * 1000000.0);
     }