]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cls: fix missing __le32 definition 35502/head
authorWillem Jan Withagen <wjw@digiware.nl>
Tue, 9 Jun 2020 15:38:32 +0000 (15:38 +0000)
committerWillem Jan Withagen <wjw@digiware.nl>
Tue, 9 Jun 2020 16:26:05 +0000 (16:26 +0000)
On platforms that do not the __le* definitions it throws a compiler error.

fixes: https://github.com/ceph/ceph/pull/35186
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
src/cls/cas/cls_cas_internal.h

index ede334aa12469a33978d9ea90641cbd51e701c95..7fa4b96286ecc229b743504f455b7210629326e5 100644 (file)
@@ -228,7 +228,7 @@ struct chunk_refs_by_hash_t : public chunk_refs_t::refs_t {
     for (auto& i : by_hash) {
       denc_signed_varint(i.first.first, p);
       // this may write some bytes past where we move cursor too; harmless!
-      *(__le32*)p.get_pos_add(hash_bytes) = i.first.second;
+      *(ceph_le32*)p.get_pos_add(hash_bytes) = i.first.second;
       denc_varint(i.second, p);
     }
     DENC_FINISH(p);
@@ -242,7 +242,7 @@ struct chunk_refs_by_hash_t : public chunk_refs_t::refs_t {
     int hash_bytes = (hash_bits + 7) / 8;
     while (n--) {
       int64_t poolid;
-      __le32 hash;
+      ceph_le32 hash;
       uint64_t count;
       denc_signed_varint(poolid, p);
       memcpy(&hash, p.get_pos_add(hash_bytes), hash_bytes);