mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
utils: define macro for ffs
Provide ffs() macro using __builtin_ffs(), when there is missing ffs() implementation in header file. Reported-by: adamboardman of gemian
This commit is contained in:
parent
6a186dd1e8
commit
ef21ed78ae
@ -89,6 +89,14 @@ static unsigned _dm_clzll(unsigned long long x)
|
|||||||
#define clzll(x) _dm_clzll((x))
|
#define clzll(x) _dm_clzll((x))
|
||||||
#endif /* ifdef HAVE___BUILTIN_CLZLL */
|
#endif /* ifdef HAVE___BUILTIN_CLZLL */
|
||||||
|
|
||||||
|
#ifndef HAVE_FFS
|
||||||
|
#ifdef HAVE___BUILTIN_FFS
|
||||||
|
#define ffs(x) __builtin_ffs((x))
|
||||||
|
#else
|
||||||
|
#error ffs() not implemented!
|
||||||
|
#endif /* ifdef HAVE___BUILTIN_FFS */
|
||||||
|
#endif /* ifndef HAVE_FFS */
|
||||||
|
|
||||||
#define KERNEL_VERSION(major, minor, release) (((major) << 16) + ((minor) << 8) + (release))
|
#define KERNEL_VERSION(major, minor, release) (((major) << 16) + ((minor) << 8) + (release))
|
||||||
|
|
||||||
/* Define some portable printing types */
|
/* Define some portable printing types */
|
||||||
|
Loading…
Reference in New Issue
Block a user