Fix condition of arc4random* and getentropy for Cygwin build

- Fix the condition of exporting getentropy
- Modify the CMake condition of including arc4random_uniform as same as autoconf
This commit is contained in:
kinichiro
2017-02-20 10:28:49 +09:00
parent 9d75e5ea97
commit 5297e9d486
2 changed files with 6 additions and 13 deletions

View File

@@ -736,8 +736,10 @@ endif()
if(NOT HAVE_ARC4RANDOM_BUF)
set(CRYPTO_SRC ${CRYPTO_SRC} compat/arc4random.c)
set(CRYPTO_SRC ${CRYPTO_SRC} compat/arc4random_uniform.c)
set(EXTRA_EXPORT ${EXTRA_EXPORT} arc4random)
set(EXTRA_EXPORT ${EXTRA_EXPORT} arc4random_buf)
set(EXTRA_EXPORT ${EXTRA_EXPORT} arc4random_uniform)
if(NOT HAVE_GETENTROPY)
if(CMAKE_HOST_WIN32)
@@ -761,11 +763,6 @@ if(NOT HAVE_ARC4RANDOM_BUF)
endif()
endif()
if(NOT HAVE_ARC4RANDOM_UNIFORM)
set(CRYPTO_SRC ${CRYPTO_SRC} compat/arc4random_uniform.c)
set(EXTRA_EXPORT ${EXTRA_EXPORT} arc4random_uniform)
endif()
if(NOT HAVE_TIMINGSAFE_BCMP)
set(CRYPTO_SRC ${CRYPTO_SRC} compat/timingsafe_bcmp.c)
set(EXTRA_EXPORT ${EXTRA_EXPORT} timingsafe_bcmp)