diff --git a/include/libwebsockets/lws-freertos.h b/include/libwebsockets/lws-freertos.h index 4b2616b67..5800b13a6 100644 --- a/include/libwebsockets/lws-freertos.h +++ b/include/libwebsockets/lws-freertos.h @@ -1,7 +1,7 @@ /* * libwebsockets - small server side websockets and web server implementation * - * Copyright (C) 2010 - 2019 Andy Green + * Copyright (C) 2010 - 2020 Andy Green * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -27,6 +27,13 @@ typedef int lws_sockfd_type; typedef int lws_filefd_type; +#if defined(LWS_AMAZON_RTOS) +#include +#include +#include +#include "timers.h" +#include + /* * Later lwip (at least 2.1.12) already defines these in its own headers * protected by the same test as used here... if POLLIN / POLLOUT already exist @@ -51,12 +58,6 @@ struct pollfd { #endif -#if defined(LWS_AMAZON_RTOS) -#include -#include -#include -#include "timers.h" -#include #else /* LWS_AMAZON_RTOS */ #include #include diff --git a/lib/plat/freertos/private-lib-plat-freertos.h b/lib/plat/freertos/private-lib-plat-freertos.h index e1206f06b..04580c480 100644 --- a/lib/plat/freertos/private-lib-plat-freertos.h +++ b/lib/plat/freertos/private-lib-plat-freertos.h @@ -24,7 +24,6 @@ * Included from lib/private-lib-core.h if LWS_PLAT_FREERTOS */ -#define MSG_NOSIGNAL 0 #define SOMAXCONN 3 #if defined(LWS_AMAZON_RTOS) @@ -95,6 +94,10 @@ gai_strerror(int); #endif #endif +#if !defined(MSG_NOSIGNAL) +#define MSG_NOSIGNAL 0 +#endif + #define compatible_close(x) close(x) #define lws_plat_socket_offset() LWIP_SOCKET_OFFSET #define wsi_from_fd(A,B) A->lws_lookup[B - lws_plat_socket_offset()]