Disable jemalloc for old mac-ppc builds, so much crappy code

This commit is contained in:
pancake 2017-08-28 20:49:33 +02:00
parent 38786dfa58
commit a48c3b7d1e
2 changed files with 8 additions and 4 deletions

View File

@ -29,6 +29,10 @@
#define R2_WWWROOT R2_DATDIR "/radare2/" R2_VERSION "/www"
#if __APPLE__ && __POWERPC__
#define HAVE_JEMALLOC 0
#else
#define HAVE_JEMALLOC @HAVE_JEMALLOC@
#endif
#endif

View File

@ -275,8 +275,9 @@ R_API bool r_socket_connect (RSocket *s, const char *host, const char *port, int
}
return false;
#elif __UNIX__ || defined(__CYGWIN__)
int gai, ret;
struct addrinfo hints, *res, *rp;
int ret;
struct addrinfo hints = {0};
struct addrinfo *res, *rp;
if (!proto) {
proto = R_SOCKET_PROTO_TCP;
}
@ -286,10 +287,9 @@ R_API bool r_socket_connect (RSocket *s, const char *host, const char *port, int
return false;
}
} else {
memset (&hints, 0, sizeof (struct addrinfo));
hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 */
hints.ai_protocol = proto;
gai = getaddrinfo (host, port, &hints, &res);
int gai = getaddrinfo (host, port, &hints, &res);
if (gai != 0) {
eprintf ("Error in getaddrinfo: %s\n", gai_strerror (gai));
return false;