Browse Source

fixed gcc build for FreeBSD

pull/93/head
orignal 10 years ago
parent
commit
58fdae92c0
  1. 3
      util.cpp

3
util.cpp

@ -8,6 +8,7 @@ @@ -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 @@ -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…
Cancel
Save