]> git.pld-linux.org Git - packages/xrdp.git/commitdiff
fix build on archs with 32bit pointers auto/th/xrdp-0.9.14-1
authorJan Palus <atler@pld-linux.org>
Sat, 7 Nov 2020 12:04:50 +0000 (13:04 +0100)
committerJan Palus <atler@pld-linux.org>
Sat, 7 Nov 2020 12:04:50 +0000 (13:04 +0100)
xrdp-int_ptr.patch [new file with mode: 0644]
xrdp.spec

diff --git a/xrdp-int_ptr.patch b/xrdp-int_ptr.patch
new file mode 100644 (file)
index 0000000..8e9f0f1
--- /dev/null
@@ -0,0 +1,49 @@
+From a7462404d5dbf3a1b8a041851aee3dfd00f8c83f Mon Sep 17 00:00:00 2001
+From: Alexandre Quesnel <131881+aquesnel@users.noreply.github.com>
+Date: Tue, 8 Sep 2020 21:04:02 +0000
+Subject: [PATCH] Adding casts for narrowing to pointer width for issue #1678
+
+---
+ sesman/chansrv/chansrv_fuse.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/sesman/chansrv/chansrv_fuse.c b/sesman/chansrv/chansrv_fuse.c
+index 62ee050a7..2f043d7a8 100644
+--- a/sesman/chansrv/chansrv_fuse.c
++++ b/sesman/chansrv/chansrv_fuse.c
+@@ -1607,7 +1607,7 @@ static void xfuse_cb_readdir(fuse_req_t req, fuse_ino_t ino, size_t size,
+         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 *) (tintptr) fi->fh) == NULL)
+     {
+         /* something seriously wrong somewhere! */
+         fuse_reply_buf(req, 0, 0);
+@@ -2095,7 +2095,7 @@ static void xfuse_cb_read(fuse_req_t req, fuse_ino_t ino, size_t size,
+     log_debug("want_bytes %zd bytes at off %lld", size, (long long) off);
+-    if ((fh = (XFUSE_HANDLE *)fi->fh) == NULL)
++    if ((fh = (XFUSE_HANDLE *) (tintptr) fi->fh) == NULL)
+     {
+         fuse_reply_err(req, EINVAL);
+     }
+@@ -2168,7 +2168,7 @@ static void xfuse_cb_write(fuse_req_t req, fuse_ino_t ino, const char *buf,
+     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 *) (tintptr) fi->fh) == NULL)
+     {
+         log_error("file handle fi->fh is NULL");
+         fuse_reply_err(req, EINVAL);
+@@ -2436,7 +2436,7 @@ static void xfuse_cb_opendir(fuse_req_t req, fuse_ino_t ino,
+ 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 *) (tintptr) fi->fh;
+     xfs_closedir(g_xfs, dh);
+     fuse_reply_err(req, 0);
+ }
index 974893724daa3574ff23be78545a3632b00a0e9b..afc70b55782c1e1eace079f06b7379d576937149 100644 (file)
--- a/xrdp.spec
+++ b/xrdp.spec
@@ -19,6 +19,7 @@ Source5:      startwm.sh
 Patch0:                config.patch
 Patch1:                quiet.patch
 Patch2:                x32.patch
+Patch3:                %{name}-int_ptr.patch
 URL:           http://www.xrdp.org/
 BuildRequires: autoconf >= 2.65
 BuildRequires: automake >= 1:1.7.2
@@ -112,6 +113,7 @@ Statyczne biblioteki xrdp.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 install %{SOURCE3} README.PLD
 install %{SOURCE4} README.PLD.pl
This page took 0.167086 seconds and 4 git commands to generate.