Skip to content

Commit

Permalink
Define PATH_MAX for Debian Hurd system (#369)
Browse files Browse the repository at this point in the history
Signed-off-by: Jose Luis Rivero <[email protected]>
  • Loading branch information
j-rivero authored Sep 9, 2020
1 parent e27010b commit 7819366
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Filesystem.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@

#include "sdf/Filesystem.hh"

/* PATH_MAX is undefined on GNU Hurd */
#ifndef PATH_MAX
#define PATH_MAX 4096
#endif

namespace sdf
{
inline namespace SDF_VERSION_NAMESPACE {
Expand Down
5 changes: 5 additions & 0 deletions src/Filesystem_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
#include <sys/types.h>
#include <unistd.h>

/* PATH_MAX is undefined on GNU Hurd */
#ifndef PATH_MAX
#define PATH_MAX 4096
#endif

/////////////////////////////////////////////////
bool create_and_switch_to_temp_dir(std::string &_new_temp_path)
{
Expand Down

0 comments on commit 7819366

Please sign in to comment.