mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 07:16:17 +02:00
tests: define fallback PATH_MAX
Few filesystem-related tests rely on PATH_MAX for buffers, and PATH_MAX is optional in POSIX (and not available on the Hurd). To make them build and pass, provide a fallback definition of PATH_MAX in case not available. Ideally speaking, the tests ought to not unconditionally rely on PATH_MAX, do alternative strategies (e.g. dynamically allocate buffers, expand them as needed, etc); OTOH this is test code, so it would be more work that what it would be worth, so IMHO the define fallback is good enough.
This commit is contained in:
parent
7442f4a161
commit
a1ccf60613
1 changed files with 4 additions and 0 deletions
|
@ -17,6 +17,10 @@
|
||||||
# define FS_ROOT FS_SEP
|
# define FS_ROOT FS_SEP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef PATH_MAX
|
||||||
|
# define PATH_MAX 4096
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace nix {
|
namespace nix {
|
||||||
|
|
||||||
/* ----------- tests for util.hh ------------------------------------------------*/
|
/* ----------- tests for util.hh ------------------------------------------------*/
|
||||||
|
|
Loading…
Reference in a new issue