Source: tl-cpputils
Version: 1.0-1
Severity: important
Tags: upstream
Justification: fails to build from source
User: debian-h...@lists.debian.org
Usertags: hurd-i386

The build of tl-cpputils for hurd-i386 (admittedly not a release
architecture) failed:

  /<<PKGBUILDDIR>>/src/tl-cpputils/filesystem_path.cpp:231:21: error: 
'PATH_MAX' was not declared in this scope

The Hurd infamously has no static PATH_MAX.  There are various ways to
deal with this limitation, depending on context.  In this case, I'd
recommend simply letting realpath allocate a buffer itself:

                char *absolutePath = realpath(_path.c_str(), nullptr);
                if (absolutePath == nullptr)
                        return {};

                _absolutePath = std::string(absolutePath);
                free(absolutePath);

Could you please take a look?

Thanks!

-- 
Aaron M. Ucko, KB1CJC (amu at alum.mit.edu, ucko at debian.org)
http://www.mit.edu/~amu/ | http://stuff.mit.edu/cgi/finger/?a...@monk.mit.edu

Reply via email to