Skip to content

Commit

Permalink
raft: Fix build on x32
Browse files Browse the repository at this point in the history
Signed-off-by: Mathias Gibbens <[email protected]>
  • Loading branch information
gibmat committed Apr 12, 2024
1 parent 7dedd6d commit 6dfc04d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/raft/uv_fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,10 @@ static int probeDirectIO(int fd, size_t *size, char *errmsg)
ErrMsgPrintf(errmsg,
"unsupported file system: %ux",
fs_info.f_type);
#elif defined(__x86_64__) && defined(__ILP32__)
ErrMsgPrintf(errmsg,
"unsupported file system: %llx",
fs_info.f_type);
#else
ErrMsgPrintf(errmsg,
"unsupported file system: %zx",
Expand Down
2 changes: 1 addition & 1 deletion src/raft/uv_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ int UvOsFallocateEmulation(int fd, off_t offset, off_t len)
if (f.f_bsize == 0) {
increment = 512;
} else if (f.f_bsize < 4096) {
increment = f.f_bsize;
increment = (ssize_t)f.f_bsize;

Check warning on line 55 in src/raft/uv_os.c

View check run for this annotation

Codecov / codecov/patch

src/raft/uv_os.c#L55

Added line #L55 was not covered by tests
} else {
increment = 4096;
}
Expand Down
2 changes: 1 addition & 1 deletion src/tracing.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ static inline void tracerEmit(const char *file,
tracerPidCached,

tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour,
tm.tm_min, tm.tm_sec, ts.tv_nsec,
tm.tm_min, tm.tm_sec, (long)ts.tv_nsec,

(unsigned)tid, tracerTraceLevelName(level), func,
tracerShortFileName(file), line, message);
Expand Down

0 comments on commit 6dfc04d

Please sign in to comment.