aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorGravatar Nikolaus Rath <Nikolaus@rath.org>2017-08-03 12:56:02 +0200
committerGravatar Nikolaus Rath <Nikolaus@rath.org>2017-08-03 12:58:09 +0200
commit9dcc2d04baeb71d85c3249ff4989c497f19956b7 (patch)
tree341a479621526b45007d23be926a151f0431b21d /example
parentf0ecf0c3e7d2250635d2293d07346fba3ef7647d (diff)
Fix compilation on 32bit systems
Fixes: #185.
Diffstat (limited to 'example')
-rw-r--r--example/passthrough_ll.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/example/passthrough_ll.c b/example/passthrough_ll.c
index fc633f5..2d7d4b5 100644
--- a/example/passthrough_ll.c
+++ b/example/passthrough_ll.c
@@ -48,18 +48,18 @@
#include <err.h>
/* We are re-using pointers to our `struct lo_inode` and `struct
- lo_dirp` elements as inodes. This means that we require uintptr_t
- and fuse_ino_t to have the same size. The following incantation
- defines a compile time assert for this requirement. */
+ lo_dirp` elements as inodes. This means that we must be able to
+ store uintptr_t values in a fuse_ino_t variable. The following
+ incantation checks this condition at compile time. */
#if defined(__GNUC__) && (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ >= 6) && !defined __cplusplus
-_Static_assert(sizeof(fuse_ino_t) == sizeof(uintptr_t), "fuse: off_t must be 64bit");
+_Static_assert(sizeof(fuse_ino_t) >= sizeof(uintptr_t),
+ "fuse_ino_t too small to hold uintptr_t values!");
#else
struct _uintptr_to_must_hold_fuse_ino_t_dummy_struct \
{ unsigned _uintptr_to_must_hold_fuse_ino_t:
- ((sizeof(fuse_ino_t) == sizeof(uintptr_t)) ? 1 : -1); };
+ ((sizeof(fuse_ino_t) >= sizeof(uintptr_t)) ? 1 : -1); };
#endif
-
/* Compat stuff. Doesn't make it work, just makes it compile. */
#ifndef HAVE_FSTATAT
#warning fstatat(2) needed by this program