add writev and readv
This commit is contained in:
parent
38c2a39300
commit
1f528c7c68
41
0035-add-writev-and-readv.patch
Normal file
41
0035-add-writev-and-readv.patch
Normal file
@ -0,0 +1,41 @@
|
||||
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
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
Summary: lwip is a small independent implementation of the TCP/IP protocol suite
|
||||
Name: lwip
|
||||
Version: 2.1.3
|
||||
Release: 22
|
||||
Release: 23
|
||||
License: BSD
|
||||
URL: http://savannah.nongnu.org/projects/lwip/
|
||||
Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.tar.gz
|
||||
@ -46,6 +46,7 @@ Patch9030: 0031-refactor-add-event-limit-send-pkts-num.patch
|
||||
Patch9031: 0032-fix-free-pbuf-miss-data.patch
|
||||
Patch9032: 0033-alloc-socket-fail-clean-sock.patch
|
||||
Patch9033: 0034-add-accept4-and-epoll_create1.patch
|
||||
Patch9034: 0035-add-writev-and-readv.patch
|
||||
|
||||
BuildRequires: gcc-c++ dos2unix dpdk-devel
|
||||
|
||||
@ -74,6 +75,9 @@ cd %{_builddir}/%{name}-%{version}/src
|
||||
%{_libdir}/liblwip.a
|
||||
|
||||
%changelog
|
||||
* Wed Oct 19 2022 zhujunhao<zhujunhao11@huawei.com> - 2.1.3-23
|
||||
- add writev and readv
|
||||
|
||||
* Sat Oct 15 2022 zhujunhao<zhujunhao11@huawei.com> - 2.1.3-22
|
||||
- add epoll_create1 and accetp4
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user