From 822ee1243acc9b2667b168bc222b6e64744de952 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Fri, 27 Aug 2021 13:51:41 -0400 Subject: [PATCH] fs_shell: Detect 64-bit by comparing LONG_MAX and INT_MAX. This is how we do it within the kernel itself. Should fix build of fs_shell on 64-bit platforms that are not x86. --- src/tools/fs_shell/vfs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/fs_shell/vfs.cpp b/src/tools/fs_shell/vfs.cpp index 27e73b8569..59ba2d249f 100644 --- a/src/tools/fs_shell/vfs.cpp +++ b/src/tools/fs_shell/vfs.cpp @@ -3697,7 +3697,7 @@ common_lock_node(int fd, bool kernel) // We need to set the locking atomically - someone // else might set one at the same time -#ifdef __x86_64__ +#if LONG_MAX == INT_MAX if (fssh_atomic_test_and_set64((int64_t *)&vnode->mandatory_locked_by, (fssh_addr_t)descriptor, 0) != 0) #else