diff --git a/Makefile b/Makefile index f15a330..2e5e3ee 100644 --- a/Makefile +++ b/Makefile @@ -352,8 +352,8 @@ intercept: $(ZT_INCLUDES) examples/intercept/intercept.cpp -D_GNU_SOURCE \ -shared -o $(BUILD)/intercept.so $< -ldl simple: - $(CXX) $(CXXFLAGS) $(SANFLAGS) $(LIBZT_INCLUDES) $(LIBZT_DEFS) examples/bindings/cpp/simple_client_server/client.cpp -o $(BUILD)/client -L$(BUILD) -lzt $(WINDEFS) - $(CXX) $(CXXFLAGS) $(SANFLAGS) $(LIBZT_INCLUDES) $(LIBZT_DEFS) examples/bindings/cpp/simple_client_server/server.cpp -o $(BUILD)/server -L$(BUILD) -lzt $(WINDEFS) + $(CXX) $(CXXFLAGS) $(SANFLAGS) $(LIBZT_INCLUDES) $(LIBZT_DEFS) examples/bindings/cpp/simple_client_server/client.cpp -o $(BUILD)/client -L$(BUILD) -lpthread -lzt $(WINDEFS) + $(CXX) $(CXXFLAGS) $(SANFLAGS) $(LIBZT_INCLUDES) $(LIBZT_DEFS) examples/bindings/cpp/simple_client_server/server.cpp -o $(BUILD)/server -L$(BUILD) -lpthread -lzt $(WINDEFS) dlltest: $(CXX) $(CXXFLAGS) diff --git a/ext/lwip/src/api/netdb.c b/ext/lwip/src/api/netdb.c index d7e6bc5..deff495 100755 --- a/ext/lwip/src/api/netdb.c +++ b/ext/lwip/src/api/netdb.c @@ -57,8 +57,7 @@ struct gethostbyname_r_helper { }; /** h_errno is exported in netdb.h for access by applications. */ -//#if LWIP_DNS_API_DECLARE_H_ERRNO -#ifndef h_errno +#if LWIP_DNS_API_DECLARE_H_ERRNO int h_errno; #endif /* LWIP_DNS_API_DECLARE_H_ERRNO */ diff --git a/include/lwipopts.h b/include/lwipopts.h index 174c2e9..2f239bf 100644 --- a/include/lwipopts.h +++ b/include/lwipopts.h @@ -516,7 +516,7 @@ happening sooner than they should. * transport. */ #define LWIP_DNS 1 -#define LWIP_DNS_API_DECLARE_H_ERRNO 0 +#define LWIP_DNS_API_DECLARE_H_ERRNO 1 /*------------------------------------------------------------------------------ -------------------------------- UDP Options ----------------------------------- diff --git a/make-liblwip.mk b/make-liblwip.mk index d9c9fbe..4e1648b 100644 --- a/make-liblwip.mk +++ b/make-liblwip.mk @@ -55,6 +55,7 @@ LWIPARCH=$(CONTRIBDIR)/ports/win32 endif ifeq ($(OSTYPE),linux) LWIPARCH=$(CONTRIBDIR)/ports/unix +CFLAGS+=-nostdlib endif ifeq ($(OSTYPE),darwin) LWIPARCH=$(CONTRIBDIR)/ports/unix @@ -64,7 +65,7 @@ LWIPARCH=$(CONTRIBDIR)/ports/unix endif LWIPINCLUDES:=-I$(LWIPDIR)/include -I$(LWIPARCH) -I$(LWIPARCH)/include -I$(LWIPDIR) -I. -Iext -Iinclude -CFLAGS=$(WINDEFS) -Wno-format -Wno-missing-prototypes -Wno-deprecated -O3 -g -Wall -fPIC $(LWIPINCLUDES) +CFLAGS+=$(WINDEFS) -Wno-format -Wno-missing-prototypes -Wno-deprecated -O3 -g -Wall -fPIC $(LWIPINCLUDES) ifeq ($(NS_DEBUG),1) CFLAGS+=-DLWIP_DEBUG=1