mirror of
https://git.freebsd.org/src.git
synced 2026-01-16 23:02:24 +00:00
linuxkpi: Add rol32()
`rol64()` and `rol32()` are used by <linux/siphash.h>. The former was added previously, before <linux/siphash.h> was added. However the latter was not, and it broke the build on armv7. Reported by: adrian Reviewed by: adrian, rpokala Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54588
This commit is contained in:
parent
10c6f1f627
commit
6c0bcd15e4
1 changed files with 6 additions and 0 deletions
|
|
@ -443,4 +443,10 @@ rol64(uint64_t word, unsigned int shift)
|
|||
return ((word << (shift & 63)) | (word >> ((-shift) & 63)));
|
||||
}
|
||||
|
||||
static inline uint32_t
|
||||
rol32(uint32_t word, unsigned int shift)
|
||||
{
|
||||
return ((word << (shift & 31)) | (word >> ((-shift) & 31)));
|
||||
}
|
||||
|
||||
#endif /* _LINUXKPI_LINUX_BITOPS_H_ */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue