patch from Stefan Sperling to allow compilation on OpenBSD

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6613 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2013-08-25 21:06:29 +00:00
parent 5bf1ce8f07
commit 1554e17f48
6 changed files with 62 additions and 3 deletions

View file

@ -93,6 +93,12 @@ freebsd-* {
DESTDIR = lib
}
################################# OpenBSD ##########################################
openbsd-* {
DESTDIR = lib
}
################################### COMMON stuff ##################################
################################### COMMON stuff ##################################

View file

@ -15,6 +15,8 @@ static bool auto_seed = bdRandom::seed( (time(NULL) + ((uint32_t) pthread_self()
#elif defined(__FreeBSD__)
// since this is completely insecure anyway, just kludge for now
static bool auto_seed = bdRandom::seed(time(NULL));
#elif defined(__OpenBSD__)
static bool auto_seed = bdRandom::seed(arc4random());
#else
static bool auto_seed = bdRandom::seed( (time(NULL) + pthread_self()*0x1293fe + (getpid()^0x113ef76b))^0x18e34a12 ) ;
#endif