Skip to content

Commit

Permalink
hurd: Fix build
Browse files Browse the repository at this point in the history
Use the shared OPAL_PATH_MAX definition rather than PATH_MAX or MAXPATHLEN.

Signed-off-by: Samuel Thibault <[email protected]>
(cherry picked from commit 13efcd0)
  • Loading branch information
sthibaul authored and jsquyres committed Jan 28, 2025
1 parent 0f80dd8 commit 856d56b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions ompi/mca/fs/base/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ static inline bool mca_fs_base_is_link (const char *filename)
static inline void mca_fs_base_get_real_filename (const char *filename, char **rfilename)
{
int namelen;
char linkbuf[PATH_MAX+1];
char linkbuf[OPAL_PATH_MAX+1];

namelen = readlink(filename, linkbuf, PATH_MAX);
namelen = readlink(filename, linkbuf, OPAL_PATH_MAX);
if (namelen == -1) {
/* something strange has happened between the time that
* we determined that this was a link and the time that
Expand Down
2 changes: 1 addition & 1 deletion oshmem/mca/memheap/base/memheap_base_static.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ int mca_memheap_base_static_init(mca_memheap_map_t *map)
uint64_t offset;
char dev[8];
uint64_t inode;
char pathname[MAXPATHLEN];
char pathname[OPAL_PATH_MAX];
FILE *fp;
char line[1024];
map_segment_t *s;
Expand Down
4 changes: 2 additions & 2 deletions test/util/opal_os_path.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,15 @@ static bool test3(void)

static bool test4(void)
{
char a[MAXPATHLEN + 10];
char a[OPAL_PATH_MAX + 10];
int i;

if (NULL == path_sep) {
printf("test4 cannot be run\n");
return(false);
}

for (i=0; i< MAXPATHLEN+5; i++) {
for (i = 0; i < OPAL_PATH_MAX + 5; i++) {
a[i] = 'a';
}
a[i] = '\0';
Expand Down

0 comments on commit 856d56b

Please sign in to comment.