diff options
-rw-r--r-- | freebsd/sys/sys/libkern.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/freebsd/sys/sys/libkern.h b/freebsd/sys/sys/libkern.h index acdedda6..dcdd8023 100644 --- a/freebsd/sys/sys/libkern.h +++ b/freebsd/sys/sys/libkern.h @@ -88,12 +88,17 @@ void arc4rand(void *ptr, u_int len, int reseed); int bcmp(const void *, const void *, size_t); void *bsearch(const void *, const void *, size_t, size_t, int (*)(const void *, const void *)); +#ifndef __rtems__ #ifndef HAVE_INLINE_FFS int ffs(int); #endif #ifndef HAVE_INLINE_FFSL int ffsl(long); #endif +#else /* __rtems__ */ +#define ffs(_x) __builtin_ffs((unsigned int)(_x)) +#define ffsl(_x) __builtin_ffsl((unsigned long)(_x)) +#endif /* __rtems__ */ #ifndef HAVE_INLINE_FLS int fls(int); #endif |