11 Star 75 Fork 103

OpenHarmony/third_party_lwip

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
0035-add-writev-and-readv.patch 1.85 KB
一键复制 编辑 原始数据 按行查看 历史
Aurora 提交于 2023-12-07 03:26 . update lwip to 2.1.3-39.oe2203sp1
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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/openharmony/third_party_lwip.git
git@gitee.com:openharmony/third_party_lwip.git
openharmony
third_party_lwip
third_party_lwip
master

搜索帮助