mirror of
https://git.freebsd.org/ports.git
synced 2025-05-21 11:33:15 -04:00
- add missing casts in RNG initialisation - import an upstream patch to avoid unaligned memory access PR: 265483 Reported by: Robert Clausecker <fuz (at) fuz.su>
20 lines
853 B
C
20 lines
853 B
C
--- linbox/ring/ntl/ntl-lzz_pex.h.orig 2022-07-28 02:52:14 UTC
|
|
+++ linbox/ring/ntl/ntl-lzz_pex.h
|
|
@@ -533,7 +533,7 @@ namespace LinBox
|
|
_size(size), _seed(seed), _ring(F)
|
|
{
|
|
if(_seed == 0)
|
|
- NTL::SetSeed(NTL::to_ZZ(time(0)));
|
|
+ NTL::SetSeed(NTL::to_ZZ(static_cast<long unsigned int>(time(0))));
|
|
else
|
|
NTL::SetSeed(NTL::to_ZZ(static_cast<long unsigned int>(_seed)));
|
|
}
|
|
@@ -545,7 +545,7 @@ namespace LinBox
|
|
|
|
{
|
|
if(_seed == 0)
|
|
- NTL::SetSeed(NTL::to_ZZ(time(0)));
|
|
+ NTL::SetSeed(NTL::to_ZZ(static_cast<long unsigned int>(time(0))));
|
|
else
|
|
NTL::SetSeed(NTL::to_ZZ(static_cast<long unsigned int>(_seed)));
|
|
}
|