New upstream version 18.08
[deb_dpdk.git] / lib / librte_eal / common / include / rte_random.h
index 63bb280..b2ca1c2 100644 (file)
@@ -31,7 +31,7 @@ extern "C" {
 static inline void
 rte_srand(uint64_t seedval)
 {
-       srand48((long unsigned int)seedval);
+       srand48((long)seedval);
 }
 
 /**
@@ -48,9 +48,9 @@ static inline uint64_t
 rte_rand(void)
 {
        uint64_t val;
-       val = lrand48();
+       val = (uint64_t)lrand48();
        val <<= 32;
-       val += lrand48();
+       val += (uint64_t)lrand48();
        return val;
 }