diff --git a/Makefile b/Makefile index b44e227..559f599 100644 --- a/Makefile +++ b/Makefile @@ -392,7 +392,7 @@ nativetest: @date +"Build script finished on %F %T" ztproxy: $(CXX) $(CXXFLAGS) $(SANFLAGS) $(LIBZT_INCLUDES) $(LIBZT_DEFS) $(ZT_INCLUDES) \ - examples/apps/ztproxy/ztproxy.cpp -o $(BUILD)/ztproxy $< -L$(BUILD) -lzt $(WINDEFS) + examples/apps/ztproxy/ztproxy.cpp -o $(BUILD)/ztproxy $< -L$(BUILD) -lzt -lpthread $(WINDEFS) @./check.sh $(BUILD)/ztproxy @date +"Build script finished on %F %T" intercept: diff --git a/src/libzt.cpp b/src/libzt.cpp index d808dec..49407c3 100644 --- a/src/libzt.cpp +++ b/src/libzt.cpp @@ -84,6 +84,7 @@ void fix_addr_socket_family(struct sockaddr *addr) so we must compensate here before feeding it into the stack. Due to this limitation we must cast the pointer to the address into two different address */ +#if defined(STACK_LWIP) if (addr->sa_len == 2) { if (addr->sa_family == 0) { addr->sa_family = addr->sa_len; @@ -96,6 +97,7 @@ void fix_addr_socket_family(struct sockaddr *addr) addr->sa_len = 0; } } +#endif /* once we've moved the value to its anticipated location, convert it from its platform-specific value to one that the network stack can work with */ #endif