[packages/xdp-tools] - added types patch (fixes build on x32, with long long time_t)
qboosh
qboosh at pld-linux.org
Sun Jul 3 09:44:59 CEST 2022
commit 1890bed15bdb6ba40bbbcfd7f14e5d1eba04e8da
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Jul 3 09:46:35 2022 +0200
- added types patch (fixes build on x32, with long long time_t)
xdp-tools-types.patch | 39 +++++++++++++++++++++++++++++++++++++++
xdp-tools.spec | 2 ++
2 files changed, 41 insertions(+)
---
diff --git a/xdp-tools.spec b/xdp-tools.spec
index 9c2ab19..6e33dbb 100644
--- a/xdp-tools.spec
+++ b/xdp-tools.spec
@@ -8,6 +8,7 @@ Group: Applications/System
#Source0Download: https://github.com/xdp-project/xdp-tools/releases
Source0: https://github.com/xdp-project/xdp-tools/releases/download/v%{version}/%{name}-%{version}.tar.gz
# Source0-md5: f4a4050e5f79b518d561c8701c3dfd68
+Patch0: %{name}-types.patch
URL: https://github.com/xdp-project/xdp-tools
BuildRequires: clang >= 10
BuildRequires: elfutils-devel
@@ -65,6 +66,7 @@ Statyczna biblioteka libxdp.
%prep
%setup -q
+%patch0 -p1
%build
CC="%{__cc}" \
diff --git a/xdp-tools-types.patch b/xdp-tools-types.patch
new file mode 100644
index 0000000..c841170
--- /dev/null
+++ b/xdp-tools-types.patch
@@ -0,0 +1,39 @@
+--- xdp-tools-1.2.4/lib/util/stats.c.orig 2022-06-28 20:21:15.000000000 +0200
++++ xdp-tools-1.2.4/lib/util/stats.c 2022-07-03 09:34:37.393386875 +0200
+@@ -107,8 +107,8 @@ int stats_print(struct stats_record *sta
+ return 0;
+
+ if (first) {
+- printf("Period of %fs ending at %lu.%06lu\n", period,
+- t.tv_sec, t.tv_nsec / 1000);
++ printf("Period of %fs ending at %llu.%06llu\n", period,
++ (unsigned long long)t.tv_sec, (unsigned long long)(t.tv_nsec / 1000));
+ first = false;
+ }
+
+--- xdp-tools-1.2.4/xdp-dump/xdpdump.c.orig 2022-06-28 20:21:15.000000000 +0200
++++ xdp-tools-1.2.4/xdp-dump/xdpdump.c 2022-07-03 09:35:58.851004482 +0200
+@@ -644,9 +644,9 @@ static bool capture_on_legacy_interface(
+ char hline[SNPRINTH_MIN_BUFFER_SIZE];
+
+ if (cfg->hex_dump) {
+- printf("%lu.%06lu: packet size %u bytes, "
++ printf("%llu.%06llu: packet size %u bytes, "
+ "captured %u bytes on if_name \"%s\"\n",
+- h.ts.tv_sec, h.ts.tv_usec,
++ (unsigned long long)h.ts.tv_sec, (unsigned long long)h.ts.tv_usec,
+ h.len, h.caplen, cfg->iface.ifname);
+
+ for (i = 0; i < h.caplen; i += 16) {
+@@ -655,9 +655,9 @@ static bool capture_on_legacy_interface(
+ printf(" %s\n", hline);
+ }
+ } else {
+- printf("%lu.%06lu: packet size %u bytes on "
++ printf("%llu.%06llu: packet size %u bytes on "
+ "if_name \"%s\"\n",
+- h.ts.tv_sec, h.ts.tv_usec,
++ (unsigned long long)h.ts.tv_sec, (unsigned long long)h.ts.tv_usec,
+ h.len, cfg->iface.ifname);
+ }
+ }
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/xdp-tools.git/commitdiff/1890bed15bdb6ba40bbbcfd7f14e5d1eba04e8da
More information about the pld-cvs-commit
mailing list