random-util: allow RDRAND to be used in 32-bit x86 binaries
Rename rdrand64 to rdrand, and switch from uint64_t to unsigned long. This produces code that will compile/assemble on both x86-64 and x86-32. This could be useful when running a 32-bit copy of systemd on a modern Intel processor. RDRAND is inherently arch-specific, so relying on the compiler-defined 'long' type seems reasonable.
This commit is contained in:
committed by
Lennart Poettering
parent
e29a9fcb29
commit
33dbab6fde
@@ -30,4 +30,4 @@ static inline uint32_t random_u32(void) {
|
||||
return u;
|
||||
}
|
||||
|
||||
int rdrand64(uint64_t *ret);
|
||||
int rdrand(unsigned long *ret);
|
||||
|
||||
Reference in New Issue
Block a user