Description: Trying to establish compatibility with GNU Hurd
 Trial fix.
 .
 cbmc (5.84.0-6) unstable; urgency=low
 .
   * Fix further portability problems (Closes: #1038866)
Author: Michael Tautschnig <mt@debian.org>
Bug-Debian: https://bugs.debian.org/1038866

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2023-06-25

--- cbmc-5.84.0.orig/src/util/config.cpp
+++ cbmc-5.84.0/src/util/config.cpp
@@ -952,7 +952,7 @@ bool configt::set(const cmdlinet &cmdlin
     ansi_c.mode = ansi_ct::flavourt::CLANG;
     ansi_c.preprocessor=ansi_ct::preprocessort::CLANG;
   }
-  else if(os=="linux" || os=="solaris")
+  else if(os=="linux" || os=="solaris" || os=="hurd")
   {
     ansi_c.lib=configt::ansi_ct::libt::LIB_FULL;
     ansi_c.os=configt::ansi_ct::ost::OS_LINUX;
@@ -1460,6 +1460,8 @@ irep_idt configt::this_operating_system(
   this_os="linux";
   #elif __SVR4
   this_os="solaris";
+  #elif __gnu_hurd__
+  this_os="hurd"
   #else
   this_os="unknown";
   #endif
--- cbmc-5.84.0.orig/src/util/memory_info.cpp
+++ cbmc-5.84.0/src/util/memory_info.cpp
@@ -14,7 +14,7 @@ Author: Daniel Kroening, kroening@kroeni
 #include <malloc/malloc.h>
 #endif
 
-#ifdef __linux__
+#ifdef __GLIBC__
 #include <malloc.h>
 #endif
 
@@ -35,7 +35,7 @@ Author: Daniel Kroening, kroening@kroeni
 
 void memory_info(std::ostream &out)
 {
-#if defined(__linux__) && defined(__GLIBC__)
+#ifdef __GLIBC__
   // NOLINTNEXTLINE(readability/identifiers)
   struct mallinfo m = mallinfo();
   out << "  non-mmapped space allocated from system: " << m.arena << "\n";
