diff options
Diffstat (limited to 'include/linux/bitops_compat.h')
-rw-r--r-- | include/linux/bitops_compat.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/bitops_compat.h b/include/linux/bitops_compat.h new file mode 100644 index 000000000..8e1e25809 --- /dev/null +++ b/include/linux/bitops_compat.h @@ -0,0 +1,19 @@ +#ifndef _SPL_BITOPS_COMPAT_H +#define _SPL_BITOPS_COMPAT_H + +#include <linux/bitops.h> + +#ifndef HAVE_FLS64 + +static inline int fls64(__u64 x) +{ + __u32 h = x >> 32; + if (h) + return fls(h) + 32; + return fls(x); +} + +#endif /* HAVE_FLS64 */ + +#endif /* _SPL_BITOPS_COMPAT_H */ + |