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
|
#ifdef _WIN32
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
|
#else
|
||||||
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DOCUMENT_ROOT "."
|
#define DOCUMENT_ROOT "."
|
||||||
|
@ -281,14 +281,8 @@ protected:
|
|||||||
char * postData;
|
char * postData;
|
||||||
unsigned long postDataLen;
|
unsigned long postDataLen;
|
||||||
|
|
||||||
CivetConnection() {
|
CivetConnection();
|
||||||
postData = NULL;
|
~CivetConnection();
|
||||||
postDataLen = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
~CivetConnection() {
|
|
||||||
free(postData);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct mg_context *context;
|
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