From 256cfa3be098fb45d5c2de047f88786e88051e73 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Fri, 10 Aug 2018 12:10:55 -0400 Subject: Guard use of Serialized_RNG with thread macro check --- src/lib/ffi/ffi_rng.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/lib/ffi') 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; -- cgit v1.2.3