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:
@@ -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_ */
|
||||
|
||||
Reference in New Issue
Block a user