Skip to content

Commit

Permalink
< C23
Browse files Browse the repository at this point in the history
  • Loading branch information
pmp-p authored and yamt committed Nov 29, 2024
1 parent 82fc4b1 commit d5be5ec
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions libwasi/wasi_abi_sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ wasi_sock_accept(struct exec_context *ctx, struct host_instance *hi,
int hostchildfd = -1;
int host_ret = 0;
int ret;

#if !defined(TOYWASM_OLD_WASI_LIBC)
struct sockaddr_storage ss;
struct sockaddr *sa = (void *)&ss;
socklen_t salen;
#endif
/*
* non-zero fdflags is used by accept4.
*
Expand Down Expand Up @@ -72,9 +76,6 @@ wasi_sock_accept(struct exec_context *ctx, struct host_instance *hi,
errno = ENOSYS;
hostchildfd = -1;
#else
struct sockaddr_storage ss;
struct sockaddr *sa = (void *)&ss;
socklen_t salen;
hostchildfd = accept(hostfd, sa, &salen);
#endif
if (hostchildfd < 0) {
Expand Down

0 comments on commit d5be5ec

Please sign in to comment.