Fixes for building with MinGW
Added fixes to avoid compile errors and warnings when building under Windows using MinGW
This commit is contained in:
parent
734f10a19b
commit
3f41a9de5b
4 changed files with 3 additions and 2 deletions
|
@ -49,6 +49,7 @@ if(GIT_EXECUTABLE)
|
|||
OUTPUT_VARIABLE GIT_HOST
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
string(REGEX REPLACE "([^\\])[\\]([^\\])" "\\1\\\\\\\\\\2" GIT_USER ${GIT_USER})
|
||||
set(LWS_BUILD_HASH ${GIT_USER}@${GIT_HOST}-${GIT_HASH})
|
||||
message("Git commit hash: ${LWS_BUILD_HASH}")
|
||||
endif()
|
||||
|
|
|
@ -541,7 +541,6 @@ _lws_plat_file_read(struct lws *wsi, lws_filefd_type fd, unsigned long *amount,
|
|||
{
|
||||
DWORD _amount;
|
||||
|
||||
(void *)wsi;
|
||||
if (!ReadFile((HANDLE)fd, buf, (DWORD)len, &_amount, NULL)) {
|
||||
*amount = 0;
|
||||
|
||||
|
|
|
@ -233,7 +233,6 @@ int lws_http_serve(struct lws *wsi, char *uri, const char *origin)
|
|||
char path[256], sym[256];
|
||||
unsigned char *p = (unsigned char *)sym + 32 + LWS_PRE, *start = p;
|
||||
unsigned char *end = p + sizeof(sym) - 32 - LWS_PRE;
|
||||
size_t len;
|
||||
int n, spin = 0;
|
||||
|
||||
snprintf(path, sizeof(path) - 1, "%s/%s", origin, uri);
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
|
||||
#endif
|
||||
|
||||
#include <winsock2.h>
|
||||
|
||||
#ifndef _TIMEZONE_DEFINED
|
||||
struct timezone
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue