LWS_O_RDONLY to hide perversions

Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
Andy Green 2015-12-10 13:03:10 +08:00
parent 4812551234
commit cca0d7d27f
2 changed files with 3 additions and 1 deletions

View file

@ -179,11 +179,13 @@ extern "C" {
#endif
#define LWS_INVALID_FILE INVALID_HANDLE_VALUE
#define LWS_O_RDONLY _O_RDONLY
#else /* NOT WIN32 */
#include <unistd.h>
#define LWS_INVALID_FILE -1
#define LWS_O_RDONLY O_RDONLY
#ifndef MBED_OPERATORS
#include <poll.h>

View file

@ -168,7 +168,7 @@ int callback_http(struct lws_context *context, struct lws *wsi,
pss->fd = lws_plat_file_open(lws_get_fops(context),
leaf_path, &file_len,
O_RDONLY);
LWS_O_RDONLY);
if (pss->fd == LWS_INVALID_FILE)
return -1;