mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
Fixed read of the jpg in Windows
Windows needs to open things with _O_BINARY Signed-off-by: Michel Archambault <marchamb@matrox.com>
This commit is contained in:
parent
2577c831f4
commit
e8c00aa47e
1 changed files with 5 additions and 0 deletions
|
@ -142,7 +142,12 @@ static int callback_http(struct libwebsocket_context *context,
|
|||
|
||||
p = buffer;
|
||||
|
||||
#ifdef WIN32
|
||||
pss->fd = open(LOCAL_RESOURCE_PATH"/leaf.jpg", O_RDONLY | _O_BINARY);
|
||||
#else
|
||||
pss->fd = open(LOCAL_RESOURCE_PATH"/leaf.jpg", O_RDONLY);
|
||||
#endif
|
||||
|
||||
if (pss->fd < 0)
|
||||
return -1;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue