diff --git a/iptraf-ng-Add-sw64-architecture.patch b/iptraf-ng-Add-sw64-architecture.patch new file mode 100755 index 0000000000000000000000000000000000000000..48ee8c05f47aa17aa1ae556406c69e8bf43b0e5e --- /dev/null +++ b/iptraf-ng-Add-sw64-architecture.patch @@ -0,0 +1,35 @@ +From b79f6837f0ac885736b5677887e760dd85954d99 Mon Sep 17 00:00:00 2001 +From: wxy +Date: Sat, 22 Oct 2022 09:16:10 +0800 +Subject: [PATCH] Add sw64 architecture + +Signed-off-by: wxy +--- + src/capt.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/src/capt.c b/src/capt.c +index 324d7cc..5554ef1 100644 +--- a/src/capt.c ++++ b/src/capt.c +@@ -42,10 +42,17 @@ static int capt_set_recv_timeout(int fd, unsigned int msec) + + timeout.tv_sec = msec / 1000; + timeout.tv_usec = (msec % 1000) * 1000; ++#ifdef __sw_64__ ++ if(setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO_OLD, &timeout, len) != 0) ++ return -1; ++ else ++ return 0; ++#else + if(setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &timeout, len) != 0) + return -1; + else + return 0; ++#endif + } + + static int capt_setup_receive_function(struct capt *capt) +-- +2.33.0 + diff --git a/iptraf-ng.spec b/iptraf-ng.spec index cc9f025ea717544ba4ef20e17562e441be7e8b16..13092211f6e9e7aa6589150bba71e34fa951c4d6 100644 --- a/iptraf-ng.spec +++ b/iptraf-ng.spec @@ -1,7 +1,7 @@ Name: iptraf-ng Summary: A console-based network monitoring utility Version: 1.2.1 -Release: 2 +Release: 3 License: GPLv2+ URL: https://github.com/%{name}/%{name}/ Source0: https://github.com/%{name}/%{name}/archive/v%{version}.tar.gz @@ -11,6 +11,7 @@ Source2: %{name}-tmpfiles.conf Patch0: backport-use-correct-format-specifier-for-time_t-type.patch Patch1: backport-use-correct-format-specifier-when-printing-packet-count.patch Patch2: backport-use-correct-format-specifier-for-table-entcount-variable.patch +Patch3: iptraf-ng-Add-sw64-architecture.patch BuildRequires: gcc ncurses-devel Obsoletes: iptraf < 3.1 @@ -74,6 +75,12 @@ install -d -m 0755 %{buildroot}/run/%{name}/ %{_mandir}/man8/*.8.gz %changelog +* Fri Oct 21 2022 wuzx - 1.2.1-3 +- Type:feature +- CVE:NA +- SUG:NA +- DESC:Add sw64 architecture + * Thu Oct 20 2022 yanglu - 1.2.1-2 - Type:bugfix - Id:NA