Control: tags 957152 + patch
Control: tags 957152 + pending

Dear maintainer,

I've prepared an NMU for duperemove (versioned as 0.11.1-3.1) and
uploaded it to DELAYED/2. Please feel free to tell me if I
should cancel it.

--
Regards
Sudip

diff -Nru duperemove-0.11.1/debian/changelog duperemove-0.11.1/debian/changelog
--- duperemove-0.11.1/debian/changelog  2019-01-10 13:18:07.000000000 +0000
+++ duperemove-0.11.1/debian/changelog  2020-08-25 19:37:15.000000000 +0100
@@ -1,3 +1,11 @@
+duperemove (0.11.1-3.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix ftbfs with GCC-10. (Closes: #957152)
+    - Use upstream patch.
+
+ -- Sudip Mukherjee <sudipm.mukher...@gmail.com>  Tue, 25 Aug 2020 19:37:15 
+0100
+
 duperemove (0.11.1-3) unstable; urgency=medium
 
   * Add cross.patch (Closes: #918500)
diff -Nru 
duperemove-0.11.1/debian/patches/0005-Fix-declare_alloc_tracking-macro-229.patch
 
duperemove-0.11.1/debian/patches/0005-Fix-declare_alloc_tracking-macro-229.patch
--- 
duperemove-0.11.1/debian/patches/0005-Fix-declare_alloc_tracking-macro-229.patch
    1970-01-01 01:00:00.000000000 +0100
+++ 
duperemove-0.11.1/debian/patches/0005-Fix-declare_alloc_tracking-macro-229.patch
    2020-08-25 19:11:37.000000000 +0100
@@ -0,0 +1,57 @@
+From 58dd49fb429339b7104c23224f45aa99c5d160a0 Mon Sep 17 00:00:00 2001
+From: Nikolay Borisov <nbori...@suse.com>
+Date: Wed, 10 Jun 2020 18:27:12 +0300
+Subject: [PATCH] Fix declare_alloc_tracking macro (#229)
+
+This macro erroneously omitted using the passed _type argument when
+defining gmutex. Furthermore, every mutex defined by the macro is
+accessed via static functions implying it's private. Thus also make
+it static.
+---
+
+upstream link: 
https://github.com/lorddoskias/duperemove/commit/58dd49fb429339b7104c23224f45aa99c5d160a0
+
+ memstats.h | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/memstats.h b/memstats.h
+index e01005f..6f79cd6 100644
+--- a/memstats.h
++++ b/memstats.h
+@@ -57,7 +57,7 @@ static inline void decrement_counters(unsigned long long 
*num_type,
+ }
+ 
+ #define declare_alloc_tracking(_type)                                 \
+-GMutex        alloc_##_mutex;                                                 
\
++static GMutex alloc_##_type##_mutex;                                  \
+ unsigned long long num_##_type = 0;                                   \
+ unsigned long long max_##_type = 0;                                   \
+ static inline struct _type *malloc_##_type(void)                      \
+@@ -65,7 +65,7 @@ static inline struct _type *malloc_##_type(void)             
        \
+       struct _type *t = malloc(sizeof(struct _type));                 \
+       if (t)                                                          \
+               increment_counters(&num_##_type, &max_##_type, 1ULL,    \
+-                                 &alloc_##_mutex);                    \
++                                 &alloc_##_type##_mutex);             \
+       return t;                                                       \
+ }                                                                     \
+ static inline struct _type *calloc_##_type(int n)                     \
+@@ -73,13 +73,13 @@ static inline struct _type *calloc_##_type(int n)          
        \
+       struct _type *t = calloc(n, sizeof(struct _type));              \
+       if (t)                                                          \
+               increment_counters(&num_##_type, &max_##_type, n,       \
+-                                 &alloc_##_mutex);                    \
++                                 &alloc_##_type##_mutex);             \
+       return t;                                                       \
+ }                                                                     \
+ static inline void free_##_type(struct _type *t)                      \
+ {                                                                     \
+       if (t) {                                                        \
+-              decrement_counters(&num_##_type, &alloc_##_mutex);      \
++              decrement_counters(&num_##_type, &alloc_##_type##_mutex);       
\
+               free(t);                                                \
+       }                                                               \
+ }                                                                     \
+-- 
+2.20.1
+
diff -Nru duperemove-0.11.1/debian/patches/series 
duperemove-0.11.1/debian/patches/series
--- duperemove-0.11.1/debian/patches/series     2019-01-10 11:24:57.000000000 
+0000
+++ duperemove-0.11.1/debian/patches/series     2020-08-25 19:12:30.000000000 
+0100
@@ -2,3 +2,4 @@
 0002-Add-a-few-compiled-executables-to-.gitignore.patch
 0003-Open-the-target-O_RDONLY-for-root-for-BTRFS_IOC_FILE.patch
 0004-Allow-pkg-config-to-be-substituted.patch
+0005-Fix-declare_alloc_tracking-macro-229.patch

Reply via email to