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:
Michel Archambault 2013-03-14 11:45:49 -04:00 committed by Andy Green
parent 2577c831f4
commit e8c00aa47e

View file

@ -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;