Temporarily commented out thread-safe version of zts_gethostbyname(), added -fpermissive to Makefile for MinGW Windows build
This commit is contained in:
2
Makefile
2
Makefile
@@ -43,7 +43,7 @@ ARTOOL=ar
|
|||||||
ARFLAGS=rcs
|
ARFLAGS=rcs
|
||||||
CC=gcc
|
CC=gcc
|
||||||
CXX=g++
|
CXX=g++
|
||||||
CXXFLAGS+=-Wno-unknown-pragmas -Wno-pointer-arith -Wno-deprecated-declarations -Wno-conversion-null
|
CXXFLAGS+=-fpermissive -Wno-unknown-pragmas -Wno-pointer-arith -Wno-deprecated-declarations -Wno-conversion-null
|
||||||
WINDEFS=-lws2_32 -lshlwapi -liphlpapi -static -static-libgcc -static-libstdc++
|
WINDEFS=-lws2_32 -lshlwapi -liphlpapi -static -static-libgcc -static-libstdc++
|
||||||
LWIPARCHINCLUDE=$(LWIPCONTRIBDIR)/ports/win32/include
|
LWIPARCHINCLUDE=$(LWIPCONTRIBDIR)/ports/win32/include
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -270,14 +270,14 @@ int zts_sethostname(const char *name, size_t len)
|
|||||||
struct hostent *zts_gethostbyname(const char *name)
|
struct hostent *zts_gethostbyname(const char *name)
|
||||||
{
|
{
|
||||||
#if defined(STACK_LWIP)
|
#if defined(STACK_LWIP)
|
||||||
// TODO:
|
// TODO: Test thread safety
|
||||||
|
/*
|
||||||
char buf[256];
|
char buf[256];
|
||||||
int buflen = 256;
|
int buflen = 256;
|
||||||
int h_err = 0;
|
int h_err = 0;
|
||||||
struct hostent hret;
|
struct hostent hret;
|
||||||
struct hostent **result = NULL;
|
struct hostent **result = NULL;
|
||||||
int err = 0;
|
int err = 0;
|
||||||
/*
|
|
||||||
if ((err = lwip_gethostbyname_r(name, &hret, buf, buflen, result, &h_err)) != 0) {
|
if ((err = lwip_gethostbyname_r(name, &hret, buf, buflen, result, &h_err)) != 0) {
|
||||||
DEBUG_ERROR("err = %d", err);
|
DEBUG_ERROR("err = %d", err);
|
||||||
DEBUG_ERROR("h_err = %d", h_err);
|
DEBUG_ERROR("h_err = %d", h_err);
|
||||||
@@ -287,8 +287,6 @@ struct hostent *zts_gethostbyname(const char *name)
|
|||||||
return *result;
|
return *result;
|
||||||
*/
|
*/
|
||||||
return lwip_gethostbyname(name);
|
return lwip_gethostbyname(name);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#if defined(STCK_PICO)
|
#if defined(STCK_PICO)
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user