diff options
author | Mike Gilbert <floppym@gentoo.org> | 2018-11-08 09:47:16 -0500 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-11-10 14:56:53 +0100 |
commit | 33dbab6fde5423ce61b5544ca49afa13495477a8 (patch) | |
tree | be46001261b2f1786d0706589a36df5031296980 /src/basic/random-util.h | |
parent | e29a9fcb29a0509ccc30bcfe07ecf5dc2b4de9ea (diff) | |
download | systemd-33dbab6fde5423ce61b5544ca49afa13495477a8.tar.gz |
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.
Diffstat (limited to 'src/basic/random-util.h')
-rw-r--r-- | src/basic/random-util.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/random-util.h b/src/basic/random-util.h index 7a960cf9e7..3e8c288d3d 100644 --- a/src/basic/random-util.h +++ b/src/basic/random-util.h @@ -30,4 +30,4 @@ static inline uint32_t random_u32(void) { return u; } -int rdrand64(uint64_t *ret); +int rdrand(unsigned long *ret); |