Skip to content

define default MAXPATHLEN if not defined by system#3672

Merged
rhc54 merged 1 commit intoopenpmix:masterfrom
drew-parsons:MAXPATHLEN_hurd_default
Sep 3, 2025
Merged

define default MAXPATHLEN if not defined by system#3672
rhc54 merged 1 commit intoopenpmix:masterfrom
drew-parsons:MAXPATHLEN_hurd_default

Conversation

@drew-parsons
Copy link
Contributor

A definition of MAXPATHLEN is not a mandatory part of the POSIX standard, and is not defined for GNU hurd operating system, where <sys/param.h> is not available.

cf. https://www.gnu.org/software/hurd/community/gsoc/project_ideas/maxpath.html
for further context.

But it is difficult to use getcwd without MAXPATHLEN, so set a default value if it has not been defined in <sys/param.h>.

This allows openpmix to build for hurd.

The patch is taken from debian,
https://salsa.debian.org/science-team/pmix/-/blob/e29db6a5b8e523a3b5e0d80922d5958a0d8e0d07/debian/patches/hurd-fix.patch
and has been successfully tested in debian hurd builds, e.g.
https://buildd.debian.org/status/fetch.php?pkg=pmix&arch=hurd-amd64&ver=6.0.0-3&stamp=1756199722&raw=0

Closes: #3671

@rhc54
Copy link
Contributor

rhc54 commented Aug 27, 2025

Thanks! Can you please sign off the commit? Just a line Signed-off-by: name <email>

@drew-parsons drew-parsons force-pushed the MAXPATHLEN_hurd_default branch from 37cea5a to 9c2104b Compare August 27, 2025 18:24
@rhc54
Copy link
Contributor

rhc54 commented Aug 27, 2025

I'll take a gander at the CI error - nothing to do with your PR, so something else has snuck through the backdoor.

@openpmix openpmix deleted a comment from github-actions bot Sep 3, 2025
A definition of MAXPATHLEN is not a mandatory part of the POSIX
standard, and is not defined for hurd (where <sys/param.h> is not
available).

cf.
https://www.gnu.org/software/hurd/community/gsoc/project_ideas/maxpath.html
for further context.

But it is difficult to use getcwd without MAXPATHLEN, so set a default
value if it has not been defined in <sys/param.h>.

This allows openpmix to build for hurd.

The patch is taken from debian,
https://salsa.debian.org/science-team/pmix/-/blob/e29db6a5b8e523a3b5e0d80922d5958a0d8e0d07/debian/patches/hurd-fix.patch

Signed-off-by: Drew Parsons <dparsons@debian.org>
@rhc54 rhc54 force-pushed the MAXPATHLEN_hurd_default branch from 9c2104b to 4251cbc Compare September 3, 2025 15:36
@rhc54 rhc54 merged commit 32f1a46 into openpmix:master Sep 3, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mca base: MAXPATHLEN not defined on hurd

2 participants