diff --git a/base/libc.jl b/base/libc.jl index 7ed0e937fde09..379c76dfd8c60 100644 --- a/base/libc.jl +++ b/base/libc.jl @@ -398,6 +398,6 @@ rand(::Type{Float64}) = rand(UInt32) * 2.0^-32 Interface to the C `srand(seed)` function. """ -srand(seed=floor(time())) = ccall(:srand, Cvoid, (Cuint,), seed) +srand(seed=floor(Int, time()) % Cuint) = ccall(:srand, Cvoid, (Cuint,), seed) end # module