From 6048d026d07ddc6a274de8968feb7f5bb6c21fe9 Mon Sep 17 00:00:00 2001 From: ramblehead Date: Sat, 28 Aug 2021 00:21:31 +0100 Subject: [PATCH] Fixes #1306 - transitive dependencies in header files (#1310) * uSockets/src/internal/networking/bsd.h Add #include "libusockets.h" for LIBUS_SOCKET_DESCRIPTOR * uWebSockets/src/AsyncSocket.h Add #include for memcpy Add #include "libusockets.h" for us_socket * uWebSockets/src/HttpResponse.h Add #include "HttpContext.h" for HttpContext * uWebSockets/src/PerMessageDeflate.h Add #include for uint32_t * uWebSockets/src/WebSocketContextData.h Add #include "Loop.h" for Loop::get() Add #include "AsyncSocket.h" for AsyncSocket * uWebSockets/src/WebSocketProtocol.h Add #include for WIN32_EXPORT macro --- src/AsyncSocket.h | 4 ++++ src/HttpResponse.h | 1 + src/PerMessageDeflate.h | 2 ++ src/WebSocketContextData.h | 3 +++ src/WebSocketProtocol.h | 2 ++ 5 files changed, 12 insertions(+) diff --git a/src/AsyncSocket.h b/src/AsyncSocket.h index 743f406..1511419 100644 --- a/src/AsyncSocket.h +++ b/src/AsyncSocket.h @@ -24,6 +24,10 @@ * to unsigned length for everything to/from uSockets - this would however remove the opportunity * to signal error with -1 (which is how the entire UNIX syscalling is built). */ +#include + +#include "libusockets.h" + #include "LoopData.h" #include "AsyncSocketData.h" diff --git a/src/HttpResponse.h b/src/HttpResponse.h index 861fac5..fa7a88e 100644 --- a/src/HttpResponse.h +++ b/src/HttpResponse.h @@ -22,6 +22,7 @@ #include "AsyncSocket.h" #include "HttpResponseData.h" +#include "HttpContext.h" #include "HttpContextData.h" #include "Utilities.h" diff --git a/src/PerMessageDeflate.h b/src/PerMessageDeflate.h index b6ee0be..2cc5367 100644 --- a/src/PerMessageDeflate.h +++ b/src/PerMessageDeflate.h @@ -20,6 +20,8 @@ #ifndef UWS_PERMESSAGEDEFLATE_H #define UWS_PERMESSAGEDEFLATE_H +#include + /* We always define these options no matter if ZLIB is enabled or not */ namespace uWS { /* Compressor mode is HIGH8(windowBits), LOW8(memLevel) */ diff --git a/src/WebSocketContextData.h b/src/WebSocketContextData.h index 4cac0da..d0da1d9 100644 --- a/src/WebSocketContextData.h +++ b/src/WebSocketContextData.h @@ -18,6 +18,9 @@ #ifndef UWS_WEBSOCKETCONTEXTDATA_H #define UWS_WEBSOCKETCONTEXTDATA_H +#include "Loop.h" +#include "AsyncSocket.h" + #include "MoveOnlyFunction.h" #include #include diff --git a/src/WebSocketProtocol.h b/src/WebSocketProtocol.h index db282e4..0d8790f 100644 --- a/src/WebSocketProtocol.h +++ b/src/WebSocketProtocol.h @@ -18,6 +18,8 @@ #ifndef UWS_WEBSOCKETPROTOCOL_H #define UWS_WEBSOCKETPROTOCOL_H +#include + #include #include #include