]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix sofia initstate correctly
authorMichael Jerris <mike@jerris.com>
Mon, 16 Feb 2009 23:47:32 +0000 (23:47 +0000)
committerMichael Jerris <mike@jerris.com>
Mon, 16 Feb 2009 23:47:32 +0000 (23:47 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12073 d0543943-73ff-0310-b7d9-9358b9ac24b2

libs/sofia-sip/libsofia-sip-ua/su/su_uniqueid.c
libs/sofia-sip/m4/sac-su2.m4

index 6c2a72bd5eee60132433630358ce7ca1ddb24c4f..f5f0f2c5f1554d10247cb96db19c3aabc3cbd6df 100644 (file)
@@ -138,7 +138,7 @@ static void init(void)
 
 #if HAVE_INITSTATE
   /* Allow libsofia-sip-ua.so to unload. */
-  uint32_t *seed = calloc(32, sizeof *seed);
+  uint32_t *seed = calloc(32, sizeof(uint32_t));
 #else
   static uint32_t seed[32] = { 0 };
 #endif
@@ -171,7 +171,7 @@ static void init(void)
   }
 
 #if HAVE_INITSTATE
-  initstate(seed[0] ^ seed[1], (char *)&seed, sizeof(seed));
+  initstate(seed[0] ^ seed[1], (char *)seed, 32 * sizeof(uint32_t));
 #else
   srand(seed[0] ^ seed[1]);
 #endif
index 5b47ef4fe46bc51ed9e95fa38ad11f43e300db32..2a8d75d6a6fd70e5d9a930723c3b43c982966cba 100644 (file)
@@ -526,7 +526,7 @@ AC_SEARCH_LIBS(getaddrinfo, xnet socket nsl)
 
 AC_FUNC_ALLOCA
 
-AC_CHECK_FUNCS([gettimeofday strerror random tcsetattr flock \
+AC_CHECK_FUNCS([gettimeofday strerror random tcsetattr initstate flock \
                 socketpair gethostname gethostbyname getipnodebyname \
                 poll epoll_create kqueue select if_nameindex \
                signal alarm \