Skip to content

Commit 25bd5a5

Browse files
committed
Fix cfg guards
1 parent 5c6294a commit 25bd5a5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ mod_use!(cfg(target_os = "redox"), use_file);
190190
mod_use!(cfg(target_os = "solaris"), solaris_illumos);
191191
mod_use!(cfg(windows), windows);
192192
mod_use!(cfg(target_env = "sgx"), rdrand);
193-
mod_use!(cfg(target_os = "uefi"), rdrand);
193+
mod_use!(cfg(all(target_arch = "x86_64", target_os = "uefi")), rdrand);
194194
mod_use!(cfg(target_os = "wasi"), wasi);
195195

196196
mod_use!(
@@ -232,7 +232,7 @@ mod_use!(
232232
target_os = "openbsd",
233233
target_os = "redox",
234234
target_os = "solaris",
235-
target_os = "uefi",
235+
all(target_arch = "x86_64", target_os = "uefi"),
236236
target_env = "sgx",
237237
windows,
238238
all(

src/rdrand.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ unsafe fn rdrand() -> Result<[u8; WORD_SIZE], Error> {
3131
Err(Error::UNKNOWN)
3232
}
3333

34-
#[cfg(and(target_env = "sgx", not(target_feature = "rdrand")))]
34+
#[cfg(all(target_env = "sgx", not(target_feature = "rdrand")))]
3535
compile_error!("SGX targets must enable RDRAND to get randomness");
3636

3737
// TODO use is_x86_feature_detected!("rdrand") when that works in core. See:

0 commit comments

Comments
 (0)