diff --git a/sqlite-vec.c b/sqlite-vec.c index 7af3b6a7..d329d38c 100644 --- a/sqlite-vec.c +++ b/sqlite-vec.c @@ -782,7 +782,11 @@ static unsigned int __builtin_popcountl(unsigned int x) { } #else #include +#ifdef _WIN64 #define __builtin_popcountl __popcnt64 +#else +static unsigned int __builtin_popcountl(u64 n) { return __popcnt((u32)n) + __popcnt((u32)(n >> 32)); } +#endif #endif #endif