kopia lustrzana https://github.com/stlink-org/stlink
rodzic
47ab2901b9
commit
eb03b7c290
|
@ -5,15 +5,6 @@
|
|||
#define _USE_W32_SOCKETS 1
|
||||
#include <windows.h>
|
||||
|
||||
#define ENOTCONN WSAENOTCONN
|
||||
#define EWOULDBLOCK WSAEWOULDBLOCK
|
||||
#define ENOBUFS WSAENOBUFS
|
||||
#define ECONNRESET WSAECONNRESET
|
||||
#define ESHUTDOWN WSAESHUTDOWN
|
||||
#define EAFNOSUPPORT WSAEAFNOSUPPORT
|
||||
#define EPROTONOSUPPORT WSAEPROTONOSUPPORT
|
||||
#define EINPROGRESS WSAEINPROGRESS
|
||||
#define EISCONN WSAEISCONN
|
||||
|
||||
/* winsock doesn't feature poll(), so there is a version implemented
|
||||
* in terms of select() in mingw.c. The following definitions
|
||||
|
|
|
@ -19,15 +19,17 @@ void *mmap (void *addr, size_t len, int prot, int flags, int fd, long long offs
|
|||
|
||||
count = read(fd, buf, len);
|
||||
|
||||
if (count != len) {
|
||||
if (count != (ssize_t)len) {
|
||||
free (buf);
|
||||
return MAP_FAILED;
|
||||
}
|
||||
|
||||
return buf;
|
||||
(void)flags;
|
||||
}
|
||||
|
||||
int munmap (void *addr, size_t len) {
|
||||
free (addr);
|
||||
return 0;
|
||||
(void)len;
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue