From b7408ba4861d4472e8b129e97accb3af7a72f15d Mon Sep 17 00:00:00 2001 From: panchenbo Date: Sun, 8 Oct 2023 10:52:12 +0800 Subject: [PATCH] add loongarch64 and sw_64 support (cherry picked from commit cac979f71f3e325a021da75ddeb0f2b158697b02) --- ...NONBLOCK-and-FIONBIO-when-not-defined.patch | 18 ++++++++++++++++++ lwip.spec | 10 +++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 0071-add-O_NONBLOCK-and-FIONBIO-when-not-defined.patch diff --git a/0071-add-O_NONBLOCK-and-FIONBIO-when-not-defined.patch b/0071-add-O_NONBLOCK-and-FIONBIO-when-not-defined.patch new file mode 100644 index 0000000..d4dda8b --- /dev/null +++ b/0071-add-O_NONBLOCK-and-FIONBIO-when-not-defined.patch @@ -0,0 +1,18 @@ +diff --git a/src/include/lwipopts.h b/src/include/lwipopts.h +index 5ba123f..baf739e 100644 +--- a/src/include/lwipopts.h ++++ b/src/include/lwipopts.h +@@ -244,9 +244,13 @@ + + #define SO_REUSE 1 + ++#ifndef FIONBIO + #define FIONBIO 0x5421 /* same as define in asm-generic/ioctls.h */ ++#endif + ++#ifndef O_NONBLOCK + #define O_NONBLOCK 04000 /* same as define in bits/fcntl-linux.h */ ++#endif + + #define SIOCSHIWAT 1 + diff --git a/lwip.spec b/lwip.spec index f530171..816cdf3 100644 --- a/lwip.spec +++ b/lwip.spec @@ -4,7 +4,7 @@ Summary: lwip is a small independent implementation of the TCP/IP protocol suite Name: lwip Version: 2.1.3 -Release: 76 +Release: 77 License: BSD URL: http://savannah.nongnu.org/projects/lwip/ Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.zip @@ -83,12 +83,13 @@ Patch9067: 0068-enable-UDP-CKSUM-in-lwip.patch Patch9068: 0069-add-error-check-in-hugepage_init-and-sys_mbox_free.patch Patch9069: 0070-add-CHECKSUM_UDP-when-not-support-OFFLOAD_UDP_CHECKS.patch Patch9070: 0071-fix-pbuf-tot_len-incorrect-after-pbuf_split_64k-is-c.patch +Patch9071: 0071-add-O_NONBLOCK-and-FIONBIO-when-not-defined.patch BuildRequires: gcc-c++ dos2unix dpdk-devel #Requires: -ExclusiveArch: x86_64 aarch64 +ExclusiveArch: x86_64 aarch64 loongarch64 sw_64 %description lwip is a small independent implementation of the TCP/IP protocol suite. @@ -105,7 +106,7 @@ cd %{_builddir}/%{name}-%{version}/src %install cd %{_builddir}/%{name}-%{version}/src -%make_install +%make_install INSTALL_LIB=%{buildroot}%{_libdir} %files %defattr(0644,root,root) @@ -113,6 +114,9 @@ cd %{_builddir}/%{name}-%{version}/src %{_libdir}/liblwip.a %changelog +* Sun Oct 08 2023 panchenbo - 2.1.3-77 +- add O_NONBLOCK and FIONBIO when not defined + * Fri Sep 15 2023 jiangheng - 2.1.3-76 - fix pbuf->tot_len incorrect after pbuf_split_64k is called