Commit 3bc28d43 authored by Curieux Tres's avatar Curieux Tres Committed by Philip Withnall
Browse files

stun: Rename a symbol to avoid a naming clash with OpenSSL

The symbol is not exported, but nevertheless leaks in the static version
of libnice, due to limitations on symbol visibilities with static
libraries. OpenSSL has a symbol named RAND_bytes(), which ours clashes
with if the two are linked together statically.

Avoid this by prefixing ours with ‘nice_’.
parent 705ad1df
......@@ -45,7 +45,7 @@
#include <windows.h>
#include <wincrypt.h>
void RAND_bytes (uint8_t *dst, int len)
void nice_RAND_bytes (uint8_t *dst, int len)
LPCSTR container = "Libnice key container";
......@@ -215,7 +215,7 @@ static unsigned long genrand_int32(void)
static int initialized = 0;
void RAND_bytes (uint8_t *dst, int len)
void nice_RAND_bytes (uint8_t *dst, int len)
int i;
......@@ -45,6 +45,6 @@
#include <stdint.h>
void RAND_bytes (uint8_t *dst, int len);
void nice_RAND_bytes (uint8_t *dst, int len);
#endif /* RAND_H */
......@@ -122,5 +122,5 @@ void stun_hash_creds (const uint8_t *realm, size_t realm_len,
void stun_make_transid (StunTransactionId id)
RAND_bytes (id, 16);
nice_RAND_bytes (id, 16);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment