Package: cpp-httplib
Version: 0.41.0+ds-3
Severity: important
Tags: patch
Dear Maintainers,
The package cpp-httplib fails to build from source (FTBFS) on the
GNU/Hurd 64-bit architecture (hurd-amd64).
The build process terminates with the following compiler error:
"error: ‘PATH_MAX’ was not declared in this scope"
This happens because GNU/Hurd does not impose any arbitrary
restrictions on file path lengths, and therefore deliberately does not
define the PATH_MAX constant in its headers.
To fix this issue, I implemented a standard fallback macro inside the
affected source file. If PATH_MAX is not defined by the system, it is
dynamically set to a safe temporary default value of 4096.
I have successfully verified this fix by compiling the package locally
using `dpkg-buildpackage` on a running hurd-amd64 environment. A simple
HTTP test server using the compiled .deb package was launched and
verified to work correctly.
Please find attached the patch file ('hurd-path_max.patch') containing
the exact diff for this resolution.
Thank you for your time and for maintaining this package.
Best regards,
[Torelli Paolo / Compsognathus]
--- a/httplib.cc
+++ b/httplib.cc
@@ -20,3 +20,7 @@
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif