fixed compile on ubuntu

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8079 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
electron128 2015-03-26 09:46:25 +00:00
parent 0017f246e8
commit f498a8880a
2 changed files with 6 additions and 2 deletions

View File

@ -262,12 +262,12 @@ bool ApiServerMHD::configure(std::string docroot, uint16_t port, std::string bin
}
else*/ if(allow_from_all)
{
mListenAddr.sin_addr.S_un.S_addr = htonl(INADDR_ANY);
mListenAddr.sin_addr.s_addr = htonl(INADDR_ANY);
std::cerr << "ApiServerMHD::configure(): will serve the webinterface to ALL IP adresses." << std::endl;
}
else
{
mListenAddr.sin_addr.S_un.S_addr = htonl(INADDR_LOOPBACK);
mListenAddr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
std::cerr << "ApiServerMHD::configure(): will serve the webinterface to LOCALHOST only." << std::endl;
}

View File

@ -7,6 +7,10 @@
#include <microhttpd.h>
#include <string>
#ifndef WINDOWS_SYS
#include <netinet/in.h>
#endif
#include "api/ApiServer.h"
namespace resource_api{