Browse Source

Build fixes for NO_STACK and ztproxy

pull/1/head
Joseph Henry 9 years ago
parent
commit
ad99e14301
  1. 2
      Makefile
  2. 2
      src/libzt.cpp

2
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:

2
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

Loading…
Cancel
Save