提交 2980d25a authored 作者: Michael Jerris's avatar Michael Jerris

fix sofia initstate correctly

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12073 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 b0fa96a3
...@@ -138,7 +138,7 @@ static void init(void) ...@@ -138,7 +138,7 @@ static void init(void)
#if HAVE_INITSTATE #if HAVE_INITSTATE
/* Allow libsofia-sip-ua.so to unload. */ /* Allow libsofia-sip-ua.so to unload. */
uint32_t *seed = calloc(32, sizeof *seed); uint32_t *seed = calloc(32, sizeof(uint32_t));
#else #else
static uint32_t seed[32] = { 0 }; static uint32_t seed[32] = { 0 };
#endif #endif
...@@ -171,7 +171,7 @@ static void init(void) ...@@ -171,7 +171,7 @@ static void init(void)
} }
#if HAVE_INITSTATE #if HAVE_INITSTATE
initstate(seed[0] ^ seed[1], (char *)&seed, sizeof(seed)); initstate(seed[0] ^ seed[1], (char *)seed, 32 * sizeof(uint32_t));
#else #else
srand(seed[0] ^ seed[1]); srand(seed[0] ^ seed[1]);
#endif #endif
......
...@@ -526,7 +526,7 @@ AC_SEARCH_LIBS(getaddrinfo, xnet socket nsl) ...@@ -526,7 +526,7 @@ AC_SEARCH_LIBS(getaddrinfo, xnet socket nsl)
AC_FUNC_ALLOCA AC_FUNC_ALLOCA
AC_CHECK_FUNCS([gettimeofday strerror random tcsetattr flock \ AC_CHECK_FUNCS([gettimeofday strerror random tcsetattr initstate flock \
socketpair gethostname gethostbyname getipnodebyname \ socketpair gethostname gethostbyname getipnodebyname \
poll epoll_create kqueue select if_nameindex \ poll epoll_create kqueue select if_nameindex \
signal alarm \ signal alarm \
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论