[v2: keep using 'long' instead of switching to 'uintptr_t']

Signed-off-by: Eric Biggers <ebigge...@gmail.com>
---
 src/lowntfs-3g.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lowntfs-3g.c b/src/lowntfs-3g.c
index b05492e..3f09840 100644
--- a/src/lowntfs-3g.c
+++ b/src/lowntfs-3g.c
@@ -1506,9 +1506,9 @@ close:
                        of->parent = 0;
                        of->ino = ino;
                        of->state = state;
-#ifdef PLUGIN_ENABLED
+#ifndef PLUGINS_DISABLED
                        memcpy(&of->fi, fi, sizeof(struct fuse_file_info));
-#endif /* PLUGIN_ENABLED */
+#endif /* PLUGINS_DISABLED */
                        of->next = ctx->open_files;
                        of->previous = (struct open_file*)NULL;
                        if (ctx->open_files)
@@ -1555,7 +1555,7 @@ static void ntfs_fuse_read(fuse_req_t req, fuse_ino_t 
ino, size_t size,
                REPARSE_POINT *reparse;
                struct open_file *of;
 
-               of = (struct open_file*)fi;
+               of = (struct open_file*)(long)fi->fh;
                res = CALL_REPARSE_PLUGIN(ni, read, buf, size, offset, &of->fi);
                if (res >= 0) {
                        goto stamps;
@@ -1636,7 +1636,7 @@ static void ntfs_fuse_write(fuse_req_t req, fuse_ino_t 
ino, const char *buf,
                REPARSE_POINT *reparse;
                struct open_file *of;
 
-               of = (struct open_file*)fi;
+               of = (struct open_file*)(long)fi->fh;
                res = CALL_REPARSE_PLUGIN(ni, write, buf, size, offset,
                                                                &of->fi);
                if (res >= 0) {
-- 
2.10.2


------------------------------------------------------------------------------
_______________________________________________
ntfs-3g-devel mailing list
ntfs-3g-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel

Reply via email to