mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 00:00:29 +03:00
fixed gcc build for FreeBSD
This commit is contained in:
parent
20aa516121
commit
58fdae92c0
3
util.cpp
3
util.cpp
@ -8,6 +8,7 @@
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/filesystem/fstream.hpp>
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <boost/program_options/detail/config_file.hpp>
|
||||
#include <boost/program_options/parsers.hpp>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
@ -372,7 +373,7 @@ namespace http
|
||||
portstr_ = std::string(port_i + 1, host_.end());
|
||||
host_.assign(host_.begin(), port_i);
|
||||
try{
|
||||
port_ = std::stoi(portstr_);
|
||||
port_ = boost::lexical_cast<decltype(port_)>(portstr_);
|
||||
}
|
||||
catch (std::exception e) {
|
||||
port_ = 80;
|
||||
|
Loading…
Reference in New Issue
Block a user