Make XENHVM work on i386. The __ffs() function counts bits starting from

zero, unlike ffs(3), which starts counting from 1.
This commit is contained in:
Colin Percival 2012-01-16 02:38:45 +00:00
parent 20332cc2b2
commit 206d503b92

View file

@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$");
#include <dev/xen/xenpci/xenpcivar.h>
#if defined(__i386__)
#define __ffs(word) ffs(word)
#define __ffs(word) (ffs(word) - 1)
#elif defined(__amd64__)
static inline unsigned long __ffs(unsigned long word)
{