Skip to content
Snippets Groups Projects
Commit e20c9a42 authored by David Anderson's avatar David Anderson
Browse files

- client: other Android stuff, from Joachim

svn path=/trunk/boinc/; revision=25983
parent 22f93cf0
Branches
Tags debian/1.27-3
No related merge requests found
......@@ -5281,3 +5281,11 @@ David 3 Aug 2012
cs_prefs.cpp
main.cpp
hostinfo_network.cpp
David 3 Aug 2012
- client: other Android stuff, from Joachim
client/
cs_platforms.cpp
lib/
md5_file.cpp
......@@ -96,8 +96,6 @@ void CLIENT_STATE::detect_platforms() {
}
add_platform("windows_intelx86");
#endif
#elif defined(ANDROID)
add_platform("arm-android");
#elif defined(__APPLE__)
......
......@@ -34,6 +34,10 @@
#include <wincrypt.h>
#endif
#ifdef ANDROID
#include <stdlib.h>
#endif
#include "error_numbers.h"
#include "md5.h"
......@@ -96,6 +100,9 @@ std::string md5_string(const unsigned char* data, int nbytes) {
return std::string(output);
}
// make a random 32-char string
// (the MD5 of some quasi-random bits)
//
int make_random_string(char* out) {
char buf[256];
#ifdef _WIN32
......@@ -111,6 +118,10 @@ int make_random_string(char* out) {
}
CryptReleaseContext(hCryptProv, 0);
#elif defined ANDROID
// /dev/random not available on Android, using stdlib function instead
int i = rand();
snprintf(buf, sizeof(buf), "%d", i);
#else
#ifndef _USING_FCGI_
FILE* f = fopen("/dev/random", "r");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment