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

Bug#892231: sdformat: FTBFS on hurd-i386: PATH_MAX undeclared

Source: sdformat
Version: 6.0.0+dfsg-4
Severity: important
Tags: upstream
Justification: fails to build from source (but built successfully in the past)
User: debian-hurd@lists.debian.org
Usertags: hurd

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

  /<<BUILDDIR>>/sdformat-6.0.0+dfsg/src/Filesystem.cc:133:21: error: 'PATH_MAX' was not declared in this scope

The Hurd notoriously has no static PATH_MAX.  Best practice is to
accommodate whatever you actually encounter, since fixed-size buffers
generally either waste memory or risk being too small.  In particular,
I would suggest taking advantage of realpath's policy of allocating
memory itself if you pass a NULL buffer.  (You'll of course need to
free the resolved path when you're done with it.)

Could you please take a look?


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: