Fix warnings and Windows compile problems
This commit is contained in:
parent
3447f7ec83
commit
5f18f6cbca
5
net_io.c
5
net_io.c
|
@ -782,9 +782,8 @@ int handleHTTPRequest(struct client *c, char *p) {
|
|||
}
|
||||
|
||||
if (clen < 0) {
|
||||
char buf[128];
|
||||
content = realloc(content, sizeof(buf));
|
||||
clen = snprintf(content,sizeof(buf),"Error opening HTML file: %s", strerror(errno));
|
||||
content = realloc(content, 128);
|
||||
clen = snprintf(content, 128,"Error opening HTML file: %s", strerror(errno));
|
||||
statuscode = 404;
|
||||
}
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ _inline uint64_t strtoll(const char *p, void *e, UINT32 base) {return _atoi64(p)
|
|||
_inline int inet_aton(const char * cp, DWORD * ulAddr) { *ulAddr = inet_addr(cp); return 0;}
|
||||
#define snprintf _snprintf
|
||||
#define vsnprintf _vsnprintf
|
||||
#define realpath(A, B) _fullpath(B, A, _MAX_PATH)
|
||||
#define realpath(N,R) _fullpath((R),(N),_MAX_PATH)
|
||||
|
||||
_inline void cls() {
|
||||
HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
|
|
Loading…
Reference in a new issue