Skip to content

Commit fea3378

Browse files
committed
always use the alloc version
1 parent 976f49a commit fea3378

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

libc-bottom-half/headers/public/wasi/libc-find-relpath.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ int __wasilibc_find_relpath_alloc(
7070
char **relative,
7171
size_t *relative_len,
7272
int can_realloc
73-
) __attribute__((__weak__));
73+
);
7474

7575
#ifdef __cplusplus
7676
}

libc-bottom-half/sources/posix.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ static int find_relpath2(
1919
) {
2020
// See comments in `preopens.c` for what this trick is doing.
2121
const char *abs;
22-
if (__wasilibc_find_relpath_alloc)
22+
if (&__wasilibc_find_relpath_alloc)
2323
return __wasilibc_find_relpath_alloc(path, &abs, relative, relative_len, 1);
2424
return __wasilibc_find_relpath(path, &abs, relative, *relative_len);
2525
}

libc-bottom-half/sources/preopens.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ int __wasilibc_find_relpath(const char *path,
163163
// If `chdir` is linked, whose object file defines this symbol, then we
164164
// call that. Otherwise if the program can't `chdir` then `path` is
165165
// absolute (or relative to the root dir), so we delegate to `find_abspath`
166-
if (__wasilibc_find_relpath_alloc)
166+
if (&__wasilibc_find_relpath_alloc)
167167
return __wasilibc_find_relpath_alloc(path, abs_prefix, relative_path, &relative_path_len, 0);
168168
return __wasilibc_find_abspath(path, abs_prefix, (const char**) relative_path);
169169
}

0 commit comments

Comments
 (0)