diff options
-rw-r--r-- | libc/include/string.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libc/include/string.h b/libc/include/string.h index 96b26fa..890ffc2 100644 --- a/libc/include/string.h +++ b/libc/include/string.h @@ -35,4 +35,9 @@ void *memcpy(void *dest, const void *src, size_t n); void *memmove(void *dest, const void *src, size_t n); int memcmp(const void *s1, const void *s2, size_t n); +static inline int ffs(unsigned long val) +{ + return __builtin_ffs(val); +} + #endif |