Temporarily removed DNS support to prevent TLS h_errno conflict. Updated CMakeLists

This commit is contained in:
Joseph Henry
2017-12-07 16:45:02 -08:00
parent 78bf7c3a1f
commit de0ce73023
5 changed files with 13 additions and 7 deletions

View File

@@ -53,9 +53,10 @@ include_directories("${PROJ_DIR}/zto/node")
include_directories("${PROJ_DIR}/zto/service")
file(GLOB zto_src_glob "${ZTO_SRC_DIR}/node/*.cpp" "${ZTO_SRC_DIR}/service/*.cpp" "${ZTO_SRC_DIR}/osdep/OSUtils.cpp" "${ZTO_SRC_DIR}/controller/*.cpp" "${ZTO_SRC_DIR}/osdep/ManagedRoute.cpp")
add_library(zto ${zto_src_glob})
add_dependencies(zto zt)
add_library(httpparser "${ZTO_SRC_DIR}/ext/http-parser/http_parser.c")
target_compile_options(zto PRIVATE -std=c++11 -DZT_SDK=1)
target_link_libraries(zto httpparser)
target_link_libraries(zto httpparser zt)
# libzt
set(LIBZT_SRC_DIR ${PROJ_DIR}/src)
@@ -63,7 +64,6 @@ include_directories("${LIBZT_SRC_DIR}")
include_directories("${PROJ_DIR}/include")
file(GLOB libzt_src_glob ${LIBZT_SRC_DIR}/*.cpp)
add_library(zt ${libzt_src_glob})
add_dependencies(zt zto)
target_compile_options(zt PRIVATE -std=c++11 -DZT_SDK=1 -DLIBZT_TRACE=1)
target_link_libraries(zt zto)
target_link_libraries(zt lwip)

View File

@@ -514,7 +514,7 @@ happening sooner than they should.
* LWIP_DNS==1: Turn on DNS module. UDP must be available for DNS
* transport.
*/
#define LWIP_DNS 1
#define LWIP_DNS 0
#define LWIP_DNS_API_DECLARE_H_ERRNO 1
/*------------------------------------------------------------------------------

View File

@@ -36,7 +36,7 @@
#include "lwip/sockets.h"
#include "lwip/ip_addr.h"
#include "lwip/netdb.h"
#include "dns.h"
//#include "dns.h"
#endif
#if defined(NO_STACK)
#include <sys/socket.h>
@@ -291,6 +291,7 @@ int zts_sethostname(const char *name, size_t len)
#endif
}
/*
struct hostent *zts_gethostbyname(const char *name)
{
if (zts_ready() == false) {
@@ -302,7 +303,7 @@ struct hostent *zts_gethostbyname(const char *name)
#endif
#if defined(ZT_LWIP_SEQ_SOCKET)
// TODO: Test thread safety
/*
char buf[256];
int buflen = 256;
int h_err = 0;
@@ -316,7 +317,7 @@ struct hostent *zts_gethostbyname(const char *name)
return NULL; // failure
}
return *result;
*/
return lwip_gethostbyname(name);
#endif
#if defined(ZT_PICO_BSD_SOCKET)
@@ -325,6 +326,7 @@ struct hostent *zts_gethostbyname(const char *name)
#endif
return NULL;
}
*/
int zts_close(int fd)
{
@@ -606,6 +608,7 @@ int zts_shutdown(int fd, int how)
#endif
}
/*
int zts_add_dns_nameserver(struct sockaddr *addr)
{
DEBUG_EXTRA();
@@ -646,6 +649,7 @@ int zts_del_dns_nameserver(struct sockaddr *addr)
return -1;
#endif
}
*/
/* The rationale for the following correctional methods is as follows:

View File

@@ -280,10 +280,12 @@ void lwip_eth_rx(VirtualTap *tap, const ZeroTier::MAC &from, const ZeroTier::MAC
}
}
/*
void lwip_dns_init()
{
dns_init();
}
*/
void lwip_start_dhcp(void *netif)
{