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_’.
#include <windows.h>
#include <wincrypt.h>
-void RAND_bytes (uint8_t *dst, int len)
+void nice_RAND_bytes (uint8_t *dst, int len)
{
HCRYPTPROV hCryptProv;
LPCSTR container = "Libnice key container";
static int initialized = 0;
-void RAND_bytes (uint8_t *dst, int len)
+void nice_RAND_bytes (uint8_t *dst, int len)
{
int i;
#include <stdint.h>
#endif
-void RAND_bytes (uint8_t *dst, int len);
+void nice_RAND_bytes (uint8_t *dst, int len);
#endif /* RAND_H */
void stun_make_transid (StunTransactionId id)
{
- RAND_bytes (id, 16);
+ nice_RAND_bytes (id, 16);
}