aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/math.c
diff options
context:
space:
mode:
authorFamiu Haque <famiuhaque@proton.me>2024-04-05 07:56:35 +0600
committerGitHub <noreply@github.com>2024-04-05 09:56:35 +0800
commit75b80516d5133202b1e6848ad0c6d640543b313c (patch)
tree3bac75b2c058015c92667affef28527cdbe2d2a9 /src/nvim/math.c
parentdc69c475a5804c6c01987722f4cf6298d4e33e64 (diff)
downloadrneovim-75b80516d5133202b1e6848ad0c6d640543b313c.tar.gz
rneovim-75b80516d5133202b1e6848ad0c6d640543b313c.tar.bz2
rneovim-75b80516d5133202b1e6848ad0c6d640543b313c.zip
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`.
Diffstat (limited to 'src/nvim/math.c')
-rw-r--r--src/nvim/math.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/math.c b/src/nvim/math.c
index 39d166bb53..2fd9cd6ce7 100644
--- a/src/nvim/math.c
+++ b/src/nvim/math.c
@@ -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;