mirror of
https://git.freebsd.org/ports.git
synced 2025-05-21 03:23:10 -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
821 B
C
20 lines
821 B
C
--- linbox/ring/ntl/ntl-gf2e.h.orig 2022-07-28 02:52:14 UTC
|
|
+++ linbox/ring/ntl/ntl-gf2e.h
|
|
@@ -211,7 +211,7 @@ public :
|
|
_size(size), _seed(seed)
|
|
{
|
|
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)));
|
|
}
|
|
@@ -221,7 +221,7 @@ public :
|
|
|
|
{
|
|
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)));
|
|
}
|