Control: tags 1002167 + patch
Control: tags 1002167 + pending

Dear maintainer,

I've prepared an NMU for hmat-oss (versioned as 1.2.0-2.2) and uploaded 
it to DELAYED/14. Please feel free to tell me if I should cancel it.

cu
Adrian
diff -Nru hmat-oss-1.2.0/debian/changelog hmat-oss-1.2.0/debian/changelog
--- hmat-oss-1.2.0/debian/changelog	2020-05-02 02:18:14.000000000 +0300
+++ hmat-oss-1.2.0/debian/changelog	2022-01-19 18:14:34.000000000 +0200
@@ -1,3 +1,10 @@
+hmat-oss (1.2.0-2.2) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Backport upstream fix for FTBFS with glibc 2.33. (Closes: #1002167)
+
+ -- Adrian Bunk <b...@debian.org>  Wed, 19 Jan 2022 18:14:34 +0200
+
 hmat-oss (1.2.0-2.1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru hmat-oss-1.2.0/debian/patches/0001-instrumentation-Use-mallinfo2-from-glibc-2.33.patch hmat-oss-1.2.0/debian/patches/0001-instrumentation-Use-mallinfo2-from-glibc-2.33.patch
--- hmat-oss-1.2.0/debian/patches/0001-instrumentation-Use-mallinfo2-from-glibc-2.33.patch	1970-01-01 02:00:00.000000000 +0200
+++ hmat-oss-1.2.0/debian/patches/0001-instrumentation-Use-mallinfo2-from-glibc-2.33.patch	2022-01-19 18:14:34.000000000 +0200
@@ -0,0 +1,41 @@
+From 40b12c8c90ab5d67847fec6bda6111c396fa3b0d Mon Sep 17 00:00:00 2001
+From: Julien Schueller <schuel...@phimeca.com>
+Date: Fri, 19 Feb 2021 10:22:35 +0100
+Subject: instrumentation: Use mallinfo2 from glibc 2.33
+
+mallinfo being deprecated
+---
+ src/common/memory_instrumentation.cpp | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/src/common/memory_instrumentation.cpp b/src/common/memory_instrumentation.cpp
+index 22acd3d..a98870e 100644
+--- a/src/common/memory_instrumentation.cpp
++++ b/src/common/memory_instrumentation.cpp
+@@ -31,7 +31,11 @@
+ #ifdef __GLIBC__
+ #include <malloc.h>
+ // Do not care about thread safety. This is an acceptable approximation.
++#if __GLIBC_PREREQ(2,33)
++static struct mallinfo2 global_mallinfo;
++#else
+ static struct mallinfo global_mallinfo;
++#endif
+ static int mallinfo_counter;
+ #endif
+ static int write_counter;
+@@ -142,7 +146,11 @@ void MemoryInstrumenter::allocImpl(mem_t size, char type) {
+ #ifdef __GLIBC__
+         mallinfo_counter ++;
+         if(mallinfo_counter >= mallinfo_sampling) {
++#if __GLIBC_PREREQ(2,33)
++            global_mallinfo = mallinfo2();
++#else
+             global_mallinfo = mallinfo();
++#endif
+             mallinfo_counter = 0;
+         }
+         int k = 3;
+-- 
+2.20.1
+
diff -Nru hmat-oss-1.2.0/debian/patches/series hmat-oss-1.2.0/debian/patches/series
--- hmat-oss-1.2.0/debian/patches/series	2020-05-02 01:27:04.000000000 +0300
+++ hmat-oss-1.2.0/debian/patches/series	2022-01-19 18:14:05.000000000 +0200
@@ -1,3 +1,4 @@
 0001-make-build-reproducible.patch
 0002-Fix-compilation-on-Linux-32-bits-systems.patch
 fix_gcc.patch
+0001-instrumentation-Use-mallinfo2-from-glibc-2.33.patch

Reply via email to