diff -Nru clamfs-1.2.0/debian/changelog clamfs-1.2.0/debian/changelog --- clamfs-1.2.0/debian/changelog 2020-05-05 21:07:05.000000000 +0000 +++ clamfs-1.2.0/debian/changelog 2021-04-23 13:57:33.000000000 +0000 @@ -1,3 +1,10 @@ +clamfs (1.2.0-2ubuntu1) devel; urgency=medium + + * Fix FTBFS with glibc 2.33: + mallinfo() has been deprecated in favor of mallinfo2() + + -- Lukas Märdian Fri, 23 Apr 2021 15:57:33 +0200 + clamfs (1.2.0-2build2) groovy; urgency=medium * No-change rebuild against libpocofoundation70 diff -Nru clamfs-1.2.0/debian/patches/glibc-mallinfo2.patch clamfs-1.2.0/debian/patches/glibc-mallinfo2.patch --- clamfs-1.2.0/debian/patches/glibc-mallinfo2.patch 1970-01-01 00:00:00.000000000 +0000 +++ clamfs-1.2.0/debian/patches/glibc-mallinfo2.patch 2021-04-23 13:56:43.000000000 +0000 @@ -0,0 +1,54 @@ +Description: Make use of mallinfo2, available since glibc-2.33 + The upgrade to glibc 2.33 deprecated the mallinfo() call in favor of the new + mallinfo2() call. Make use of it. +Author: Lukas Märdian +Forwarded: https://github.com/burghardt/clamfs/pull/64 +Last-Update: 2021-04-23 + +--- +--- clamfs-1.2.0.orig/config.h.in ++++ clamfs-1.2.0/config.h.in +@@ -56,6 +56,9 @@ + /* Define to 1 if you have the `mallinfo' function. */ + #undef HAVE_MALLINFO + ++/* Define to 1 if you have the `mallinfo2' function. */ ++#undef HAVE_MALLINFO2 ++ + /* Define to 1 if you have the header file. */ + #undef HAVE_MALLOC_H + +--- clamfs-1.2.0.orig/configure.ac ++++ clamfs-1.2.0/configure.ac +@@ -31,7 +31,7 @@ AC_FUNC_CLOSEDIR_VOID + AC_FUNC_LSTAT + AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK + AC_FUNC_UTIME_NULL +-AC_CHECK_FUNCS([fchdir fdatasync fork ftruncate fstatat utimensat posix_fallocate copy_file_range lchown memset mkdir mkfifo rmdir setxattr strdup strerror utime mallinfo]) ++AC_CHECK_FUNCS([fchdir fdatasync fork ftruncate fstatat utimensat posix_fallocate copy_file_range lchown memset mkdir mkfifo rmdir setxattr strdup strerror utime mallinfo mallinfo2]) + + # Check for BSD 4.4 / RFC2292 style fd passing + AC_C_FDPASSING +--- clamfs-1.2.0.orig/src/stats.cxx ++++ clamfs-1.2.0/src/stats.cxx +@@ -69,7 +69,19 @@ void Stats::dumpFilesystemStatsToLog() { + + void Stats::dumpMemoryStatsToLog() { + rLog(Info, "--- begin of memory statistics ---"); +-#ifdef HAVE_MALLINFO ++#if defined(HAVE_MALLINFO2) ++ struct mallinfo2 mi = mallinfo2(); ++ rLog(Info, "Non-mmapped space allocated (arena): %zd", mi.arena); ++ rLog(Info, "Number of free chunks (ordblks): %zd", mi.ordblks); ++ rLog(Info, "Number of free fastbin blocks (smblks): %zd", mi.smblks); ++ rLog(Info, "Number of mmapped regions (hblks): %zd", mi.hblks); ++ rLog(Info, "Space allocated in mmapped regions (hblkhd): %zd", mi.hblkhd); ++ rLog(Info, "Maximum total allocated space (usmblks): %zd", mi.usmblks); ++ rLog(Info, "Space in freed fastbin blocks (fsmblks): %zd", mi.fsmblks); ++ rLog(Info, "Total allocated space (uordblks): %zd", mi.uordblks); ++ rLog(Info, "Total free space (fordblks): %zd", mi.fordblks); ++ rLog(Info, "Top-most, releasable space (keepcost): %zd", mi.keepcost); ++#elif defined(HAVE_MALLINFO) + struct mallinfo mi = mallinfo(); + rLog(Info, "Non-mmapped space allocated (arena): %d", mi.arena); + rLog(Info, "Number of free chunks (ordblks): %d", mi.ordblks); diff -Nru clamfs-1.2.0/debian/patches/series clamfs-1.2.0/debian/patches/series --- clamfs-1.2.0/debian/patches/series 2020-01-09 23:59:11.000000000 +0000 +++ clamfs-1.2.0/debian/patches/series 2021-04-23 10:12:56.000000000 +0000 @@ -1 +1,2 @@ Remove-_start-symbol-check-for-CXX-libraries.patch +glibc-mallinfo2.patch