提交 6d46bf8a 编写于 作者: B bellard

win32 fix


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1113 c046a42c-6fe2-441c-8c8c-71466251a162
上级 032a8c9e
...@@ -33,6 +33,7 @@ typedef char *caddr_t; ...@@ -33,6 +33,7 @@ typedef char *caddr_t;
#else #else
# define ioctlsocket ioctl # define ioctlsocket ioctl
# define closesocket(s) close(s) # define closesocket(s) close(s)
# define O_BINARY 0
#endif #endif
#include <sys/types.h> #include <sys/types.h>
......
...@@ -103,7 +103,7 @@ static int tftp_read_data(struct tftp_session *spt, u_int16_t block_nr, ...@@ -103,7 +103,7 @@ static int tftp_read_data(struct tftp_session *spt, u_int16_t block_nr,
int fd; int fd;
int bytes_read = 0; int bytes_read = 0;
fd = open(spt->filename, O_RDONLY); fd = open(spt->filename, O_RDONLY | O_BINARY);
if (fd < 0) { if (fd < 0) {
return -1; return -1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册