mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 22:18:33 +00:00
build: fix link error for _BitScanForward64
(#28173)
Problem: The usage of `_BitScanForward64` causes linking to fail on some systems. Solution: Correctly check if it exists using `check_c_source_compiles`.
This commit is contained in:
@@ -56,7 +56,7 @@ int xctz(uint64_t x)
|
||||
// Use compiler builtin if possible.
|
||||
#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 4))
|
||||
return __builtin_ctzll(x);
|
||||
#elif defined(_MSC_VER)
|
||||
#elif defined(HAVE_BITSCANFORWARD64)
|
||||
unsigned long index;
|
||||
_BitScanForward64(&index, x);
|
||||
return (int)index;
|
||||
|
Reference in New Issue
Block a user