diff options
author | Kaleb S. KEITHLEY <kkeithle@redhat.com> | 2017-04-04 07:35:52 -0400 |
---|---|---|
committer | Xavier Hernandez <xhernandez@datalab.es> | 2017-04-05 02:12:53 -0400 |
commit | 1063efeb2275039a75eb6fe5e423845e28098df2 (patch) | |
tree | 0c17ea2b1da3b4bb00ec270154b98011c89f149f /xlators/cluster | |
parent | 6b069086cbee39aec9da77b1831e88fe85258b0f (diff) |
build: clang has __builtin_popcount() and __builtin_ffs()
Note: Even though gcc(1) will automatically treat ffs() and popcount()
as built-in, calling them explicitly as __builtin in the source helps
make it easier to find them. (And if no __builtin_ffs use the one in
libc.)
Change-Id: Ib74d9b221ff03a01df5ad05907024da1a83a7a88
BUG: 1438772
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: https://review.gluster.org/16993
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
Reviewed-by: Xavier Hernandez <xhernandez@datalab.es>
Diffstat (limited to 'xlators/cluster')
-rw-r--r-- | xlators/cluster/ec/src/ec-helpers.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/cluster/ec/src/ec-helpers.c b/xlators/cluster/ec/src/ec-helpers.c index 751d45a63f6..4e9771f5308 100644 --- a/xlators/cluster/ec/src/ec-helpers.c +++ b/xlators/cluster/ec/src/ec-helpers.c @@ -102,7 +102,7 @@ int32_t ec_bits_consume(uint64_t * n) tmp &= -tmp; *n ^= tmp; - return ffsll(tmp) - 1; + return gf_bits_index(tmp); } size_t ec_iov_copy_to(void * dst, struct iovec * vector, int32_t count, |