We still support building on Visual Studio 2003 where rand_s() is
not available. If we are building on a Visual C compiler prior
to version 15.00, failover to srand()/rand() instead of using
rand_s().
Reviewed-on: http://gerrit.openafs.org/306
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
{
lock_InitializeMutex(&shareEnum_mx, "NetrShareEnum", 0);
shareEnumQ = NULL;
+#if _MSC_VER < 1500
+ srand((unsigned) time( NULL ));
+ shareEnum_next_handle = rand();
+#else
rand_s(&shareEnum_next_handle);
+#endif
}
void