Skip to content

Commit 6b89ea6

Browse files
vtjnashKristofferC
authored andcommitted
build: fix missing function prototype on older gcc
The ffs function is not always available under that name, use instead the compiler name for it which may always be used. (cherry picked from commit ef17985)
1 parent 317b4ef commit 6b89ea6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/gc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ STATIC_INLINE unsigned ffs_u32(uint32_t bitvec)
374374
_BitScanForward(&j, bitvec);
375375
return j;
376376
#else
377-
return ffs(bitvec) - 1;
377+
return __builtin_ffs(bitvec) - 1;
378378
#endif
379379
}
380380
#endif

0 commit comments

Comments
 (0)