From d2f5b199bc8fbcf6f56a10269b9e922d76154970 Mon Sep 17 00:00:00 2001 From: Joakim Soderberg Date: Mon, 7 Apr 2014 11:28:08 +0200 Subject: [PATCH] windows Fix build. --- CMakeLists.txt | 6 +++++- lib/private-libwebsockets.h | 7 +++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4d511e2..8aca4ea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -486,7 +486,11 @@ if (LWS_WITH_SSL) message("OpenSSL libraries: ${OPENSSL_LIBRARIES}") include_directories("${OPENSSL_INCLUDE_DIR}") - list(APPEND LIB_LIST ${OPENSSL_LIBRARIES} dl) + list(APPEND LIB_LIST ${OPENSSL_LIBRARIES}) + + # Link against dynamic linking functions. + # (Don't link directly to libdl since it is not needed on all platforms, it's now a part of libc). + list(APPEND LIB_LIST ${CMAKE_DL_LIBS}) endif() endif(LWS_WITH_SSL) diff --git a/lib/private-libwebsockets.h b/lib/private-libwebsockets.h index ee9274f..d45f6ec 100644 --- a/lib/private-libwebsockets.h +++ b/lib/private-libwebsockets.h @@ -82,6 +82,13 @@ #define lws_set_blocking_send(wsi) wsi->sock_send_blocking = TRUE #include #include +#include +#include + +#ifndef __func__ +#define __func__ __FUNCTION__ +#endif + #define LWS_INVALID_FILE INVALID_HANDLE_VALUE #else /* not windows --> */ #include -- 2.7.4