fix random_shuffle compilation

pull/91/head^2
bert hubert 2020-02-05 20:40:38 +01:00
parent b37286f0ca
commit 9c690ea663
1 changed files with 6 additions and 1 deletions

View File

@ -10,6 +10,8 @@
#include <strings.h>
#include <stdlib.h>
#include <string>
#include <algorithm>
#include <random>
#include <stdint.h>
#include "ubx.hh"
#include "navmon.hh"
@ -345,7 +347,10 @@ public:
throw NameError();
}
random_shuffle(addrs.begin(), addrs.end());
std::random_device rng;
std::mt19937 urng(rng());
std::shuffle(addrs.begin(), addrs.end(), urng);
for(auto& addr: addrs) {
if(!addr.sin4.sin_port)
addr.sin4.sin_port = ntohs(29603);