diff --git a/sys/sys/libkern.h b/sys/sys/libkern.h index e4a7880a46af..48fd4b17d486 100644 --- a/sys/sys/libkern.h +++ b/sys/sys/libkern.h @@ -77,15 +77,23 @@ void *bsearch(const void *, const void *, size_t, #ifndef HAVE_INLINE_FFS int ffs(int); #endif +#if (__UINT_MAX == __ULONG_MAX) +#define ffsl(x) ffs((x)) +#else #ifndef HAVE_INLINE_FFSL int ffsl(long); #endif +#endif #ifndef HAVE_INLINE_FLS int fls(int); #endif +#if (__UINT_MAX == __ULONG_MAX) +#define flsl(x) fls((x)) +#else #ifndef HAVE_INLINE_FLSL int flsl(long); #endif +#endif int fnmatch(const char *, const char *, int); int locc(int, char *, u_int); void qsort(void *base, size_t nmemb, size_t size,