[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#888067: tl-cpputils: FTBFS on hurd-i386: PATH_MAX not declared



Source: tl-cpputils
Version: 1.0-1
Severity: important
Tags: upstream
Justification: fails to build from source
User: debian-hurd@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/?amu@monk.mit.edu


Reply to: