[packages/libbpf] - updated to 0.1.0 - removed obsolete hashmap patch
qboosh
qboosh at pld-linux.org
Sat Aug 22 21:22:22 CEST 2020
commit 1930f955080044bbbb213e79de489b96c670c7a2
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Aug 22 21:24:50 2020 +0200
- updated to 0.1.0
- removed obsolete hashmap patch
libbpf-hashmap.patch | 32 --------------------------------
libbpf.spec | 8 +++-----
2 files changed, 3 insertions(+), 37 deletions(-)
---
diff --git a/libbpf.spec b/libbpf.spec
index 68de6fd..bd5238c 100644
--- a/libbpf.spec
+++ b/libbpf.spec
@@ -1,14 +1,13 @@
Summary: Libbpf library
Summary(pl.UTF-8): Biblioteka libbpf
Name: libbpf
-Version: 0.0.9
-Release: 2
+Version: 0.1.0
+Release: 1
License: LGPL v2.1 or BSD
Group: Libraries
#Source0Download: https://github.com/libbpf/libbpf/releases
Source0: https://github.com/libbpf/libbpf/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: 6582f932a012710cc93d7c01e04da63c
-Patch0: %{name}-hashmap.patch
+# Source0-md5: 00b991a6e2d28d797a56ab1575ed40e1
URL: https://github.com/libbpf/libbpf
BuildRequires: elfutils-devel
BuildRequires: linux-libc-headers >= 7:5.4.0
@@ -59,7 +58,6 @@ wykorzystujących libbpf.
%prep
%setup -q
-%patch0 -p1
%build
# use NO_PKG_CONFIG to link with -lelf -lz, not $(pkg-config --libs libelf) which doesn't contain -lz
diff --git a/libbpf-hashmap.patch b/libbpf-hashmap.patch
deleted file mode 100644
index 45c0660..0000000
--- a/libbpf-hashmap.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Fix libbpf hashmap on (I)LP32 architectures
-
-On ILP32, 64-bit result was shifted by value calculated for 32-bit long type
-and returned value was much outside hashmap capacity.
-As advised by Andrii Nakryiko, this patch uses different hashing variant for
-architectures with size_t shorter than long long.
-
---- libbpf-0.0.9/src/hashmap.h.orig 2020-06-17 20:48:22.000000000 +0200
-+++ libbpf-0.0.9/src/hashmap.h 2020-06-27 10:19:51.561635722 +0200
-@@ -11,14 +11,18 @@
- #include <stdbool.h>
- #include <stddef.h>
- #include <limits.h>
--#ifndef __WORDSIZE
--#define __WORDSIZE (__SIZEOF_LONG__ * 8)
--#endif
-
- static inline size_t hash_bits(size_t h, int bits)
- {
- /* shuffle bits and return requested number of upper bits */
-- return (h * 11400714819323198485llu) >> (__WORDSIZE - bits);
-+#if (__SIZEOF_SIZE_T__ == __SIZEOF_LONG_LONG__)
-+ /* LP64 case */
-+ return (h * 11400714819323198485llu) >> (__SIZEOF_LONG_LONG__ * 8 - bits);
-+#elif (__SIZEOF_SIZE_T__ <= __SIZEOF_LONG__)
-+ return (h * 2654435769lu) >> (__SIZEOF_LONG__ * 8 - bits);
-+#else
-+# error "Unsupported size_t size"
-+#endif
- }
-
- typedef size_t (*hashmap_hash_fn)(const void *key, void *ctx);
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libbpf.git/commitdiff/1930f955080044bbbb213e79de489b96c670c7a2
More information about the pld-cvs-commit
mailing list