Skip to content

Commit ef17985

Browse files
committed
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.
1 parent 3058112 commit ef17985

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
@@ -372,7 +372,7 @@ STATIC_INLINE unsigned ffs_u32(uint32_t bitvec)
372372
_BitScanForward(&j, bitvec);
373373
return j;
374374
#else
375-
return ffs(bitvec) - 1;
375+
return __builtin_ffs(bitvec) - 1;
376376
#endif
377377
}
378378
#endif

0 commit comments

Comments
 (0)