Skip to content

Commit

Permalink
[wasm] Make some libc stubs return an error instead of asserting. (#3…
Browse files Browse the repository at this point in the history
…8256)

Fixes dotnet/runtime#38164.
  • Loading branch information
vargaz authored and kevinwkt committed Jul 15, 2020
1 parent 87c1e88 commit c71bf77
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/mono/mono/mini/mini-wasm.c
Original file line number Diff line number Diff line change
Expand Up @@ -761,24 +761,24 @@ ssize_t sendfile(int out_fd, int in_fd, off_t *offset, size_t count);

ssize_t sendfile(int out_fd, int in_fd, off_t *offset, size_t count)
{
g_error ("sendfile");
return 0;
errno = ENOTSUP;
return -1;
}

int
getpwnam_r (const char *name, struct passwd *pwd, char *buffer, size_t bufsize,
struct passwd **result)
{
g_error ("getpwnam_r");
return 0;
*result = NULL;
return ENOTSUP;
}

int
getpwuid_r (uid_t uid, struct passwd *pwd, char *buffer, size_t bufsize,
struct passwd **result)
{
g_error ("getpwuid_r");
return 0;
*result = NULL;
return ENOTSUP;
}

G_END_DECLS
Expand Down

0 comments on commit c71bf77

Please sign in to comment.