diff --git a/0194-sk_wait-fix-wait-not-return-EINTR-when-interrupted-b.patch b/0194-sk_wait-fix-wait-not-return-EINTR-when-interrupted-b.patch new file mode 100644 index 0000000000000000000000000000000000000000..721736ae9c13f2f08b2ca963dfc344b4a227d6d4 --- /dev/null +++ b/0194-sk_wait-fix-wait-not-return-EINTR-when-interrupted-b.patch @@ -0,0 +1,51 @@ +From def527c148e90eb398178648b4bb8b79d4e39ccc Mon Sep 17 00:00:00 2001 +From: Lemmy Huang +Date: Thu, 10 Jul 2025 21:14:45 +0800 +Subject: [PATCH] sk_wait: fix wait not return EINTR when interrupted by signal + +Signed-off-by: Lemmy Huang +--- + src/include/arch/sys_arch.h | 20 ++++++++++++++------ + 1 file changed, 14 insertions(+), 6 deletions(-) + +diff --git a/src/include/arch/sys_arch.h b/src/include/arch/sys_arch.h +index d0189b5..98d9ddf 100644 +--- a/src/include/arch/sys_arch.h ++++ b/src/include/arch/sys_arch.h +@@ -138,9 +138,13 @@ int sys_sem_wait_internal(sys_sem_t s, int timeout) + } + } + +- if (unlikely(ret != 0)) +- return ret; +- errno = 0; ++ if (unlikely(ret != 0)) { ++ if (errno == ETIMEDOUT) { ++ timeout = 0; ++ } else { ++ timeout = -errno; ++ } ++ } + return timeout; + } + +@@ -193,9 +197,13 @@ int sys_mutex_timedlock_internal(sys_mutex_t m, int timeout) + } + } + +- if (unlikely(ret != 0)) +- return ret; +- errno = 0; ++ if (unlikely(ret != 0)) { ++ if (errno == ETIMEDOUT) { ++ timeout = 0; ++ } else { ++ timeout = -errno; ++ } ++ } + return timeout; + } + +-- +2.33.0 + diff --git a/lwip.spec b/lwip.spec index aa76d0ec4cbc35bff031adc68c0f67c4951d5981..e36a6ad4910345d7b3d8682bf21b823301fdae29 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.2.0 -Release: 72 +Release: 73 License: BSD URL: http://savannah.nongnu.org/projects/lwip/ Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.zip @@ -209,6 +209,7 @@ Patch9190: 0190-udp-fix-recv_udp-sys_mbox_trypost-failed.patch Patch9191: 0191-sk_event-fix-rtw-epoll-wrong-event-notify-and-remove.patch Patch9192: 0192-tcp-reduce-TCP_SNDQUEUELOWAT-to-1800.patch Patch9193: 0193-fix-20.03-LTS-build-failed.patch +Patch9194: 0194-sk_wait-fix-wait-not-return-EINTR-when-interrupted-b.patch BuildRequires: gcc-c++ dos2unix dpdk-devel @@ -238,6 +239,9 @@ cd %{_builddir}/%{name}-%{version}/src %{_libdir}/liblwip.a %changelog +* Wed Jul 16 2025 LemmyHuang - 2.2.0-73 +- sk_wait: fix wait not return EINTR when interrupted by signal + * Sun Jul 06 2025 LemmyHuang - 2.2.0-72 - fix 20.03 LTS build failed