Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Android/Bionic doesn't implement rand_r

This fixes Android build after #1448 was merged.
  • Loading branch information...
commit 92f690209ecb09dc7ba1a893baad9cef823f3d2e 1 parent beb2664
Jernej Fijačko authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  xbmc/Util.cpp
2  xbmc/Util.cpp
View
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.