Permalink
Browse files

Android/Bionic doesn't implement rand_r

This fixes Android build after #1448 was merged.
  • Loading branch information...
1 parent beb2664 commit 92f690209ecb09dc7ba1a893baad9cef823f3d2e @mikrohard committed Sep 24, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 xbmc/Util.cpp
View
2 xbmc/Util.cpp
@@ -2618,6 +2618,8 @@ int CUtil::GetRandomNumber()
unsigned int number;
if (rand_s(&number) == 0)
return (int)number;
+#elif defined(TARGET_ANDROID)
+ srand(time(NULL));
#else
return rand_r(&s_randomSeed);
#endif

0 comments on commit 92f6902

Please sign in to comment.