mirror of
https://github.com/lammertb/libhttp.git
synced 2025-07-29 21:01:13 +03:00
Fix C++ build errors in Linux
This commit is contained in:
@ -9,6 +9,8 @@
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <Windows.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#define DOCUMENT_ROOT "."
|
||||
|
@ -281,14 +281,8 @@ protected:
|
||||
char * postData;
|
||||
unsigned long postDataLen;
|
||||
|
||||
CivetConnection() {
|
||||
postData = NULL;
|
||||
postDataLen = 0;
|
||||
}
|
||||
|
||||
~CivetConnection() {
|
||||
free(postData);
|
||||
}
|
||||
CivetConnection();
|
||||
~CivetConnection();
|
||||
};
|
||||
|
||||
struct mg_context *context;
|
||||
|
@ -277,3 +277,12 @@ CivetServer::urlEncode(const char *src, size_t src_len, std::string &dst, bool a
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CivetServer::CivetConnection::CivetConnection() {
|
||||
postData = NULL;
|
||||
postDataLen = 0;
|
||||
}
|
||||
|
||||
CivetServer::CivetConnection::~CivetConnection() {
|
||||
free(postData);
|
||||
}
|
||||
|
Reference in New Issue
Block a user