Fixed MSVC warnings

This commit is contained in:
Volker Ruppert 2014-03-29 15:23:49 +00:00
parent 31e10bb527
commit 3e280ae594
2 changed files with 5 additions and 4 deletions

View File

@ -18,14 +18,15 @@ typedef Bit16u uint16_t;
typedef Bit32u uint32_t;
typedef Bit64u uint64_t;
typedef Bit64s ssize_t;
#ifndef BX_OSDEP_H
#define snprintf _snprintf
#define strdup _strdup
#define open _open
#define close _close
#ifndef BX_OSDEP_H
#define lseek _lseek
#endif
#define read _read
#define write _write
#endif
#define strcasecmp _stricmp
#endif

View File

@ -473,7 +473,7 @@ sorecvfrom(struct socket *so)
} else { /* A "normal" UDP packet */
struct mbuf *m;
int len;
#ifdef _WIN32
#ifdef WIN32
unsigned long n;
#else
int n;
@ -493,7 +493,7 @@ sorecvfrom(struct socket *so)
/* if (so->so_fport != htons(53)) { */
ioctlsocket(so->s, FIONREAD, &n);
if (n > len) {
if ((int)n > len) {
n = (m->m_data - m->m_dat) + m->m_len + n + 1;
m_inc(m, n);
len = M_FREEROOM(m);