aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ffi
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-08-10 12:10:55 -0400
committerJack Lloyd <[email protected]>2018-08-10 12:10:55 -0400
commit256cfa3be098fb45d5c2de047f88786e88051e73 (patch)
tree224938e2c6ce2eec1ed9cf082303dade0ffeb1b4 /src/lib/ffi
parent4ac09e49edde5949cbe5fc38034b9a8ee915feeb (diff)
Guard use of Serialized_RNG with thread macro check
Diffstat (limited to 'src/lib/ffi')
-rw-r--r--src/lib/ffi/ffi_rng.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/ffi/ffi_rng.cpp b/src/lib/ffi/ffi_rng.cpp
index b3c5cd967..a4dda59ec 100644
--- a/src/lib/ffi/ffi_rng.cpp
+++ b/src/lib/ffi/ffi_rng.cpp
@@ -32,10 +32,12 @@ int botan_rng_init(botan_rng_t* rng_out, const char* rng_type)
{
rng.reset(new Botan::AutoSeeded_RNG);
}
+#if defined(BOTAN_TARGET_OS_HAS_THREADS)
else if(rng_type_s == "user-threadsafe")
{
rng.reset(new Botan::Serialized_RNG(new Botan::AutoSeeded_RNG));
}
+#endif
else
{
return BOTAN_FFI_ERROR_BAD_PARAMETER;