]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
ceph_fuse.cc: fix 64/32bit detection
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 21 Feb 2017 15:50:13 +0000 (16:50 +0100)
committerKefu Chai <kchai@redhat.com>
Mon, 10 Apr 2017 15:34:18 +0000 (23:34 +0800)
Fix for:

[src/ceph_fuse.cc:111]: (style) Condition 'sizeof(long)==4' is always false

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/ceph_fuse.cc

index 877417fac5096c95fe2fd8c4f112b95c0ab682e0..c8018256246f0b877b3768e70f2d3b9989c6a8b4 100644 (file)
@@ -108,12 +108,12 @@ int main(int argc, const char **argv, const char *envp[]) {
   g_ceph_context->_conf->apply_changes(NULL);
 
   // check for 32-bit arch
-  if (sizeof(long) == 4) {
+#ifndef __LP64__
     cerr << std::endl;
     cerr << "WARNING: Ceph inode numbers are 64 bits wide, and FUSE on 32-bit kernels does" << std::endl;
     cerr << "         not cope well with that situation.  Expect to crash shortly." << std::endl;
     cerr << std::endl;
-  }
+#endif
 
   Preforker forker;
   if (g_conf->daemonize) {