fixed gcc build for FreeBSD

This commit is contained in:
orignal 2014-08-08 07:32:55 -04:00
parent 20aa516121
commit 58fdae92c0

View File

@ -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;