Update CMake options of RDRND

Separate CMake option of rdrand and rdseed. In some CPUs only rdrand is supported.
This commit is contained in:
Zhi Guan
2023-09-09 16:56:52 +08:00
parent 5ca0d60781
commit ac61cfae02
3 changed files with 16 additions and 5 deletions

View File

@@ -32,6 +32,7 @@ int rdrand_bytes(uint8_t *buf, size_t buflen)
return 1;
}
#ifdef INTEL_RDSEED
int rdseed_bytes(uint8_t *buf, size_t buflen)
{
unsigned long long val;
@@ -49,3 +50,4 @@ int rdseed_bytes(uint8_t *buf, size_t buflen)
}
return 1;
}
#endif