From 7f91e143e3f3b90bc5409870cf1b2592826ad495 Mon Sep 17 00:00:00 2001 From: Bojan Smojver Date: Mon, 31 Aug 2020 20:25:25 +1000 Subject: [PATCH] Try to fix fuse pointer warnings. --- xrdp-0.9.14-fuse-pointer.patch | 39 ++++++++++++++++++++++++++++++++++ xrdp.spec | 1 + 2 files changed, 40 insertions(+) create mode 100644 xrdp-0.9.14-fuse-pointer.patch diff --git a/xrdp-0.9.14-fuse-pointer.patch b/xrdp-0.9.14-fuse-pointer.patch new file mode 100644 index 0000000..6e42d7a --- /dev/null +++ b/xrdp-0.9.14-fuse-pointer.patch @@ -0,0 +1,39 @@ +diff -ruN xrdp-0.9.14-v/sesman/chansrv/chansrv_fuse.c xrdp-0.9.14/sesman/chansrv/chansrv_fuse.c +--- xrdp-0.9.14-v/sesman/chansrv/chansrv_fuse.c 2020-06-26 21:13:58.000000000 +1000 ++++ xrdp-0.9.14/sesman/chansrv/chansrv_fuse.c 2020-08-31 20:24:21.516983364 +1000 +@@ -1607,7 +1607,7 @@ + log_error("inode %ld is not valid", ino); + fuse_reply_err(req, ENOENT); + } +- else if ((dh = (struct xfs_dir_handle *) fi->fh) == NULL) ++ else if ((dh = (struct xfs_dir_handle *) (unsigned long)fi->fh) == NULL) + { + /* something seriously wrong somewhere! */ + fuse_reply_buf(req, 0, 0); +@@ -2095,7 +2095,7 @@ + + log_debug("want_bytes %zd bytes at off %lld", size, (long long) off); + +- if ((fh = (XFUSE_HANDLE *)fi->fh) == NULL) ++ if ((fh = (XFUSE_HANDLE *) (unsigned long)fi->fh) == NULL) + { + fuse_reply_err(req, EINVAL); + } +@@ -2168,7 +2168,7 @@ + log_debug("write %zd bytes at off %lld to inode=%ld", + size, (long long) off, ino); + +- if ((fh = (XFUSE_HANDLE *)fi->fh) == NULL) ++ if ((fh = (XFUSE_HANDLE *) (unsigned long)fi->fh) == NULL) + { + log_error("file handle fi->fh is NULL"); + fuse_reply_err(req, EINVAL); +@@ -2436,7 +2436,7 @@ + static void xfuse_cb_releasedir(fuse_req_t req, fuse_ino_t ino, + struct fuse_file_info *fi) + { +- struct xfs_dir_handle *dh = (struct xfs_dir_handle *) fi->fh; ++ struct xfs_dir_handle *dh = (struct xfs_dir_handle *) (unsigned long)fi->fh; + xfs_closedir(g_xfs, dh); + fuse_reply_err(req, 0); + } diff --git a/xrdp.spec b/xrdp.spec index a1ef5b9..aea5530 100644 --- a/xrdp.spec +++ b/xrdp.spec @@ -32,6 +32,7 @@ Patch4: xrdp-0.9.10-scripts-libexec.patch Patch5: xrdp-0.9.6-script-interpreter.patch Patch6: xrdp-0.9.14-log-snprintf.patch Patch7: xrdp-0.9.14-xfree86-evdev.patch +Patch7: xrdp-0.9.14-fuse-pointer.patch BuildRequires: gcc BuildRequires: libX11-devel