Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ else ()
message(WARNING "Unsupported platform, defaulting to null (no-op) implementation")
add_library(WuHost
WuHostNull.cpp
wepoll.c
wepoll.h
picohttpparser.c
)
endif()

Expand All @@ -59,6 +62,13 @@ target_link_libraries(Wu
PRIVATE Threads::Threads
)

if (MSVC)
target_link_libraries(Wu
PRIVATE WS2_32.lib
PRIVATE Crypt32.lib
)
endif()

target_link_libraries(WuHost Wu)

target_compile_options(Wu
Expand Down
5 changes: 5 additions & 0 deletions WuBufferOp.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
#include <assert.h>
#include <stddef.h>
#include <stdint.h>
#ifdef WIN32
#define __builtin_bswap16 _byteswap_ushort
#define __builtin_bswap32 _byteswap_ulong
#define __builtin_bswap64 _byteswap_uint64
#endif

template <typename T>
T ByteSwap(T v) {
Expand Down
Loading