From 4f3c031c398fef0314f7efd19a32837d40e5f8c4 Mon Sep 17 00:00:00 2001 From: Alex Hultman Date: Sat, 5 Jan 2019 00:52:45 +0100 Subject: [PATCH] Make sure UWS_NO_ZLIB, LIBUS_NO_SSL works --- Makefile | 14 +++++++------- src/StaticDispatch.h | 2 ++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index a1688b4..7ef328b 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,15 @@ .PHONY: examples examples: -# HelloWorld - clang -flto -O3 -c -IuSockets/src uSockets/src/*.c uSockets/src/eventing/*.c - clang++ -flto -O3 -c -std=c++17 -Isrc -IuSockets/src examples/HelloWorld.cpp +# HelloWorld (non-SSL, non-Zlib compile) + clang -DLIBUS_NO_SSL -flto -O3 -c -IuSockets/src uSockets/src/*.c uSockets/src/eventing/*.c + clang++ -DLIBUS_NO_SSL -DUWS_NO_ZLIB -flto -O3 -c -std=c++17 -Isrc -IuSockets/src examples/HelloWorld.cpp clang++ -flto -O3 -s *.o -o HelloWorld rm *.o -# EchoServer - clang -flto -O3 -c -IuSockets/src uSockets/src/*.c uSockets/src/eventing/*.c - clang++ -flto -O3 -c -std=c++17 -Isrc -IuSockets/src examples/EchoServer.cpp - clang++ -flto -O3 -s *.o -o EchoServer -lz +# EchoServer (non-SSL, non-Zlib compile) + clang -DLIBUS_NO_SSL -flto -O3 -c -IuSockets/src uSockets/src/*.c uSockets/src/eventing/*.c + clang++ -DLIBUS_NO_SSL -DUWS_NO_ZLIB -flto -O3 -c -std=c++17 -Isrc -IuSockets/src examples/EchoServer.cpp + clang++ -flto -O3 -s *.o -o EchoServer rm *.o # HttpServer (currently quire broken, mind you) diff --git a/src/StaticDispatch.h b/src/StaticDispatch.h index a6fceef..56a54a0 100644 --- a/src/StaticDispatch.h +++ b/src/StaticDispatch.h @@ -44,6 +44,8 @@ #define us_create_child_ssl_socket_context us_create_child_socket_context #define us_ssl_socket_shutdown us_socket_shutdown #define us_ssl_socket_context_free us_socket_context_free +/* This is the only differing function - time to fix! */ +#define us_create_ssl_socket_context(l, e, o) us_create_socket_context(l, e) #endif namespace uWS {