diff --git a/src/libbitdht.pro b/src/libbitdht.pro index dfeb1d1..5d5e499 100644 --- a/src/libbitdht.pro +++ b/src/libbitdht.pro @@ -93,6 +93,12 @@ freebsd-* { DESTDIR = lib } +################################# OpenBSD ########################################## + +openbsd-* { + DESTDIR = lib +} + ################################### COMMON stuff ################################## ################################### COMMON stuff ################################## diff --git a/src/util/bdrandom.cc b/src/util/bdrandom.cc index c680ab7..bd0e9c6 100644 --- a/src/util/bdrandom.cc +++ b/src/util/bdrandom.cc @@ -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