Buid fix for Linux

This commit is contained in:
Joseph Henry
2017-11-06 23:53:25 -08:00
parent 614432907c
commit ab6eb57da6
4 changed files with 6 additions and 6 deletions

View File

@@ -352,8 +352,8 @@ intercept:
$(ZT_INCLUDES) examples/intercept/intercept.cpp -D_GNU_SOURCE \ $(ZT_INCLUDES) examples/intercept/intercept.cpp -D_GNU_SOURCE \
-shared -o $(BUILD)/intercept.so $< -ldl -shared -o $(BUILD)/intercept.so $< -ldl
simple: 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/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) -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: dlltest:
$(CXX) $(CXXFLAGS) $(CXX) $(CXXFLAGS)

View File

@@ -57,8 +57,7 @@ struct gethostbyname_r_helper {
}; };
/** h_errno is exported in netdb.h for access by applications. */ /** h_errno is exported in netdb.h for access by applications. */
//#if LWIP_DNS_API_DECLARE_H_ERRNO #if LWIP_DNS_API_DECLARE_H_ERRNO
#ifndef h_errno
int h_errno; int h_errno;
#endif /* LWIP_DNS_API_DECLARE_H_ERRNO */ #endif /* LWIP_DNS_API_DECLARE_H_ERRNO */

View File

@@ -516,7 +516,7 @@ happening sooner than they should.
* transport. * transport.
*/ */
#define LWIP_DNS 1 #define LWIP_DNS 1
#define LWIP_DNS_API_DECLARE_H_ERRNO 0 #define LWIP_DNS_API_DECLARE_H_ERRNO 1
/*------------------------------------------------------------------------------ /*------------------------------------------------------------------------------
-------------------------------- UDP Options ----------------------------------- -------------------------------- UDP Options -----------------------------------

View File

@@ -55,6 +55,7 @@ LWIPARCH=$(CONTRIBDIR)/ports/win32
endif endif
ifeq ($(OSTYPE),linux) ifeq ($(OSTYPE),linux)
LWIPARCH=$(CONTRIBDIR)/ports/unix LWIPARCH=$(CONTRIBDIR)/ports/unix
CFLAGS+=-nostdlib
endif endif
ifeq ($(OSTYPE),darwin) ifeq ($(OSTYPE),darwin)
LWIPARCH=$(CONTRIBDIR)/ports/unix LWIPARCH=$(CONTRIBDIR)/ports/unix
@@ -64,7 +65,7 @@ LWIPARCH=$(CONTRIBDIR)/ports/unix
endif endif
LWIPINCLUDES:=-I$(LWIPDIR)/include -I$(LWIPARCH) -I$(LWIPARCH)/include -I$(LWIPDIR) -I. -Iext -Iinclude 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) ifeq ($(NS_DEBUG),1)
CFLAGS+=-DLWIP_DEBUG=1 CFLAGS+=-DLWIP_DEBUG=1