diff --git a/libretroshare/src/pqi/pqinetwork.cc b/libretroshare/src/pqi/pqinetwork.cc index ba377dadc..1b004b08e 100644 --- a/libretroshare/src/pqi/pqinetwork.cc +++ b/libretroshare/src/pqi/pqinetwork.cc @@ -529,7 +529,11 @@ bool getPreferredInterface(struct in_addr &prefAddr) // returns best addr. { std::list addrs; std::list::iterator it; - struct in_addr addr_zero = {0}, addr_loop = {0}, addr_priv = {0}, addr_ext = {0}, addr = {0}; + struct in_addr addr_zero, addr_loop, addr_priv, addr_ext; + +#ifdef NET_DEBUG + struct in_addr addr; +#endif bool found_zero = false; bool found_loopback = false; @@ -541,6 +545,15 @@ bool getPreferredInterface(struct in_addr &prefAddr) // returns best addr. return false; } + memset(&addr_zero, 0, sizeof(addr_zero)); + memset(&addr_loop, 0, sizeof(addr_loop)); + memset(&addr_priv, 0, sizeof(addr_priv)); + memset(&addr_ext, 0, sizeof(addr_ext)); + +#ifdef NET_DEBUG + memset(&addr, 0, sizeof(addr)); +#endif + // find the first of each of these. // if ext - take first. // if no ext -> first priv @@ -918,4 +931,3 @@ int WinToUnixError(int error) #endif /******************* WINDOWS SPECIFIC PART ******************/ - diff --git a/libretroshare/src/pqi/sslfns.h b/libretroshare/src/pqi/sslfns.h index 587a836d6..e1c61ea43 100644 --- a/libretroshare/src/pqi/sslfns.h +++ b/libretroshare/src/pqi/sslfns.h @@ -51,7 +51,7 @@ // IF we are compiling against ssl0.9.7 - these functions don't exist. -#if !defined(EVP_CIPHER_CTX_rand_key) +#if (OPENSSL_VERSION_NUMBER & 0xfffff000) < 0x00908000 #define SSLFNS_ADD_CIPHER_CTX_RAND_KEY 1 #endif