Skip to content

Commit

Permalink
chore: fix architectures and endianness check (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
SF-Zhou authored Mar 2, 2025
1 parent 69c1aea commit d79b7db
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/common/utils/Status.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,15 @@
#include <memory>
#include <string_view>

#include "folly/Portability.h"

namespace hf3fs {

#if !FOLLY_X64 && !FOLLY_AARCH64
#error "The platform must be 64bit!"
#endif
static_assert(std::endian::native == std::endian::little);

// `Status` imitates `abseil::Status` which contains:
// - code
// - (optional) message
Expand Down Expand Up @@ -101,7 +108,6 @@ class [[nodiscard]] Status {

private:
static_assert(StatusCode::kOK == 0, "StatusCode::kOK must be 0!");
static_assert(__x86_64__, "The platform must be 64bit!");
static_assert(sizeof(status_code_t) == 2, "The width of status_code_t must be 16b");

static constexpr auto kPtrBits = 48u;
Expand Down

0 comments on commit d79b7db

Please sign in to comment.