diff options
author | hselasky <hselasky@FreeBSD.org> | 2015-12-22 09:55:44 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2015-12-22 09:55:44 +0000 |
commit | c3f11e9f0e23d1aba656d9436d9709e39698a87e (patch) | |
tree | 914ad18283e7df51a825164fbffddb32f707afdc /lib/libcuse/cuse_lib.c | |
parent | 76efdc2ae95fa6f5acf4396f02a8f43fcaf0ecea (diff) | |
download | FreeBSD-src-c3f11e9f0e23d1aba656d9436d9709e39698a87e.zip FreeBSD-src-c3f11e9f0e23d1aba656d9436d9709e39698a87e.tar.gz |
Make CUSE usable with platforms where the size of "unsigned long" is
different from the size of a pointer.
Diffstat (limited to 'lib/libcuse/cuse_lib.c')
-rw-r--r-- | lib/libcuse/cuse_lib.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libcuse/cuse_lib.c b/lib/libcuse/cuse_lib.c index 321522d..dd25ef8 100644 --- a/lib/libcuse/cuse_lib.c +++ b/lib/libcuse/cuse_lib.c @@ -711,8 +711,8 @@ cuse_copy_out(const void *src, void *user_dst, int len) if (pe->is_local) { memcpy(user_dst, src, len); } else { - info.local_ptr = (unsigned long)src; - info.peer_ptr = (unsigned long)user_dst; + info.local_ptr = (uintptr_t)src; + info.peer_ptr = (uintptr_t)user_dst; info.length = len; error = ioctl(f_cuse, CUSE_IOCTL_WRITE_DATA, &info); @@ -744,8 +744,8 @@ cuse_copy_in(const void *user_src, void *dst, int len) if (pe->is_local) { memcpy(dst, user_src, len); } else { - info.local_ptr = (unsigned long)dst; - info.peer_ptr = (unsigned long)user_src; + info.local_ptr = (uintptr_t)dst; + info.peer_ptr = (uintptr_t)user_src; info.length = len; error = ioctl(f_cuse, CUSE_IOCTL_READ_DATA, &info); |