Fixing error “httpServer.cpp read, write was not declared in this scope” on building vpl_xmlrpc_jail-1.2 under latest Debian

For all which also got this errors,

httpServer.cpp: In member function "std::string HttpJailServer::receive(int, e_t, size_t)":
httpServer.cpp:145:36: error: "read"was not declared in this scope
httpServer.cpp: In member function "void HttpJailServer::sendRaw(const char*,ze_t)":
httpServer.cpp:216:49: error: "write" was not declared in this scope
httpServer.cpp: In member function "void HttpJailServer::send(int, const stri, const string&)":
httpServer.cpp:250:15: error: "close" was not declared in this scope

on building vpl_xmlrpc_jail-1.2 for Moodle VPL module, there seems to be a missing include for these methods.

Just add,

#include <unistd.h>

to the httpServer.cpp, these should fix it.

have fun

Mario

Leave a Reply

Your email address will not be published. Required fields are marked *