]> git.pld-linux.org Git - packages/xrdp.git/blob - xrdp-int_ptr.patch
fix build on archs with 32bit pointers
[packages/xrdp.git] / xrdp-int_ptr.patch
1 From a7462404d5dbf3a1b8a041851aee3dfd00f8c83f Mon Sep 17 00:00:00 2001
2 From: Alexandre Quesnel <131881+aquesnel@users.noreply.github.com>
3 Date: Tue, 8 Sep 2020 21:04:02 +0000
4 Subject: [PATCH] Adding casts for narrowing to pointer width for issue #1678
5
6 ---
7  sesman/chansrv/chansrv_fuse.c | 8 ++++----
8  1 file changed, 4 insertions(+), 4 deletions(-)
9
10 diff --git a/sesman/chansrv/chansrv_fuse.c b/sesman/chansrv/chansrv_fuse.c
11 index 62ee050a7..2f043d7a8 100644
12 --- a/sesman/chansrv/chansrv_fuse.c
13 +++ b/sesman/chansrv/chansrv_fuse.c
14 @@ -1607,7 +1607,7 @@ static void xfuse_cb_readdir(fuse_req_t req, fuse_ino_t ino, size_t size,
15          log_error("inode %ld is not valid", ino);
16          fuse_reply_err(req, ENOENT);
17      }
18 -    else if ((dh = (struct xfs_dir_handle *) fi->fh) == NULL)
19 +    else if ((dh = (struct xfs_dir_handle *) (tintptr) fi->fh) == NULL)
20      {
21          /* something seriously wrong somewhere! */
22          fuse_reply_buf(req, 0, 0);
23 @@ -2095,7 +2095,7 @@ static void xfuse_cb_read(fuse_req_t req, fuse_ino_t ino, size_t size,
24  
25      log_debug("want_bytes %zd bytes at off %lld", size, (long long) off);
26  
27 -    if ((fh = (XFUSE_HANDLE *)fi->fh) == NULL)
28 +    if ((fh = (XFUSE_HANDLE *) (tintptr) fi->fh) == NULL)
29      {
30          fuse_reply_err(req, EINVAL);
31      }
32 @@ -2168,7 +2168,7 @@ static void xfuse_cb_write(fuse_req_t req, fuse_ino_t ino, const char *buf,
33      log_debug("write %zd bytes at off %lld to inode=%ld",
34                size, (long long) off, ino);
35  
36 -    if ((fh = (XFUSE_HANDLE *)fi->fh) == NULL)
37 +    if ((fh = (XFUSE_HANDLE *) (tintptr) fi->fh) == NULL)
38      {
39          log_error("file handle fi->fh is NULL");
40          fuse_reply_err(req, EINVAL);
41 @@ -2436,7 +2436,7 @@ static void xfuse_cb_opendir(fuse_req_t req, fuse_ino_t ino,
42  static void xfuse_cb_releasedir(fuse_req_t req, fuse_ino_t ino,
43                                  struct fuse_file_info *fi)
44  {
45 -    struct xfs_dir_handle *dh = (struct xfs_dir_handle *) fi->fh;
46 +    struct xfs_dir_handle *dh = (struct xfs_dir_handle *) (tintptr) fi->fh;
47      xfs_closedir(g_xfs, dh);
48      fuse_reply_err(req, 0);
49  }
This page took 0.130819 seconds and 3 git commands to generate.