summaryrefslogtreecommitdiff
path: root/components/utilities/rt-link/src/rtlink_dev.c
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2025-12-08 09:15:41 +0800
committerGitHub <[email protected]>2025-12-08 09:15:41 +0800
commitf7b3a8fedd26eabda69ea55cb8577833d89a4f70 (patch)
tree7a873ff714cb643f722251eadb33980b6f9b538e /components/utilities/rt-link/src/rtlink_dev.c
parenta890e62e64c0a256f4d889829604aeb74ef26c97 (diff)
[rt-link] fix the compiling issue under 64bit arch #11018
Diffstat (limited to 'components/utilities/rt-link/src/rtlink_dev.c')
-rw-r--r--components/utilities/rt-link/src/rtlink_dev.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/components/utilities/rt-link/src/rtlink_dev.c b/components/utilities/rt-link/src/rtlink_dev.c
index ab21004ef9..b4f1add678 100644
--- a/components/utilities/rt-link/src/rtlink_dev.c
+++ b/components/utilities/rt-link/src/rtlink_dev.c
@@ -24,6 +24,8 @@
#include <sys/stat.h>
#include <sys/statfs.h>
#include <poll.h>
+#include <dfs_file.h>
+#include <fcntl.h>
int rtlink_fops_open(struct dfs_file *fd)
{
@@ -82,9 +84,9 @@ int rtlink_fops_ioctl(struct dfs_file *fd, int cmd, void *args)
}
}
-int rtlink_fops_read(struct dfs_file *fd, void *buf, size_t count)
+ssize_t rtlink_fops_read(struct dfs_file *fd, void *buf, size_t count)
{
- int size = 0;
+ ssize_t size = 0;
rt_device_t device;
device = (rt_device_t)fd->vnode->data;
@@ -96,9 +98,9 @@ int rtlink_fops_read(struct dfs_file *fd, void *buf, size_t count)
return size;
}
-int rtlink_fops_write(struct dfs_file *fd, const void *buf, size_t count)
+ssize_t rtlink_fops_write(struct dfs_file *fd, const void *buf, size_t count)
{
- int size = 0;
+ ssize_t size = 0;
rt_device_t device;
device = (rt_device_t)fd->vnode->data;