Commit 6d46bf8ae368937ef65187623be9831a4ad0b1b4

Authored by bellard
1 parent 032a8c9e

win32 fix


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1113 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 2 changed files with 2 additions and 1 deletions
slirp/slirp.h
... ... @@ -33,6 +33,7 @@ typedef char *caddr_t;
33 33 #else
34 34 # define ioctlsocket ioctl
35 35 # define closesocket(s) close(s)
  36 +# define O_BINARY 0
36 37 #endif
37 38  
38 39 #include <sys/types.h>
... ...
slirp/tftp.c
... ... @@ -103,7 +103,7 @@ static int tftp_read_data(struct tftp_session *spt, u_int16_t block_nr,
103 103 int fd;
104 104 int bytes_read = 0;
105 105  
106   - fd = open(spt->filename, O_RDONLY);
  106 + fd = open(spt->filename, O_RDONLY | O_BINARY);
107 107  
108 108 if (fd < 0) {
109 109 return -1;
... ...