代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/lwip 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From d5aca360e7518791d21ca63b44ae2dfaa6c35072 Mon Sep 17 00:00:00 2001
From: compile_success <980965867@qq.com>
Date: Mon, 17 Oct 2022 14:18:53 +0000
Subject: [PATCH] add writev and readv
---
src/api/posix_api.c | 2 ++
src/include/posix_api.h | 2 ++
2 files changed, 4 insertions(+)
diff --git a/src/api/posix_api.c b/src/api/posix_api.c
index e721381..b7334da 100644
--- a/src/api/posix_api.c
+++ b/src/api/posix_api.c
@@ -93,7 +93,9 @@ int posix_api_init(void)
CHECK_DLSYM_RET_RETURN(posix_api->shutdown_fn = dlsym(handle, "shutdown"));
CHECK_DLSYM_RET_RETURN(posix_api->close_fn = dlsym(handle, "close"));
CHECK_DLSYM_RET_RETURN(posix_api->read_fn = dlsym(handle, "read"));
+ CHECK_DLSYM_RET_RETURN(posix_api->readv_fn = dlsym(handle, "readv"));
CHECK_DLSYM_RET_RETURN(posix_api->write_fn = dlsym(handle, "write"));
+ CHECK_DLSYM_RET_RETURN(posix_api->writev_fn = dlsym(handle, "writev"));
CHECK_DLSYM_RET_RETURN(posix_api->recv_fn = dlsym(handle, "recv"));
CHECK_DLSYM_RET_RETURN(posix_api->send_fn = dlsym(handle, "send"));
CHECK_DLSYM_RET_RETURN(posix_api->recv_msg = dlsym(handle, "recvmsg"));
diff --git a/src/include/posix_api.h b/src/include/posix_api.h
index e958ded..a73e2ec 100644
--- a/src/include/posix_api.h
+++ b/src/include/posix_api.h
@@ -54,7 +54,9 @@ typedef struct {
int (*close_fn)(int fd);
pid_t (*fork_fn)(void);
ssize_t (*read_fn)(int fd, void *mem, size_t len);
+ ssize_t (*readv_fn)(int s, const struct iovec *iov, int iovcnt);
ssize_t (*write_fn)(int fd, const void *data, size_t len);
+ ssize_t (*writev_fn)(int s, const struct iovec *iov, int iovcnt);
ssize_t (*recv_fn)(int sockfd, void *buf, size_t len, int flags);
ssize_t (*send_fn)(int sockfd, const void *buf, size_t len, int flags);
ssize_t (*recv_msg)(int sockfd, const struct msghdr *msg, int flags);
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。