Commit 437257ba authored by aymeric's avatar aymeric

fix for macosx

git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@711 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
parent a82cf3f9
......@@ -1173,18 +1173,18 @@ stunRand(void)
tick <<= 32;
tick |= lowtick;
}
#elif defined(__MACH__)
{
int fd=open("/dev/random",O_RDONLY);
read(fd,&tick,sizeof(tick));
closesocket(fd);
}
#elif defined(__GNUC__) && ( defined(__i686__) || defined(__i386__) )
asm("rdtsc" : "=A" (tick));
#elif defined(__GNUC__) && defined(__amd64__)
asm("rdtsc" : "=A" (tick));
#elif defined (__SUNPRO_CC) && defined( __sparc__ )
tick = gethrtime();
#elif defined(__MACH__)
{
int fd=open("/dev/random",O_RDONLY);
read(fd,&tick,sizeof(tick));
closesocket(fd);
}
#elif defined(__linux) || defined(HAVE_DEV_RANDOM)
{
fd_set fdSet;
......
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