win32 fix

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1113 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
bellard 2004-10-09 22:57:43 +00:00
parent 032a8c9e35
commit 6d46bf8ae3
2 changed files with 2 additions and 1 deletions

View File

@ -33,6 +33,7 @@ typedef char *caddr_t;
#else
# define ioctlsocket ioctl
# define closesocket(s) close(s)
# define O_BINARY 0
#endif
#include <sys/types.h>

View File

@ -103,7 +103,7 @@ static int tftp_read_data(struct tftp_session *spt, u_int16_t block_nr,
int fd;
int bytes_read = 0;
fd = open(spt->filename, O_RDONLY);
fd = open(spt->filename, O_RDONLY | O_BINARY);
if (fd < 0) {
return -1;