-
Notifications
You must be signed in to change notification settings - Fork 30k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refs: nodejs/uvwasi#185 Add stub for sock_accept so that we have stubs for all of the sock methods in wasi_snapshot_preview1. Its a bit awkward as the method was added after the initial definitial of wasi_snapshot-preview1 but I think it should be semver minor at most to add the method. Depends on nodejs/uvwasi#185 being landed in uvwasi first and an updated version of uvwasi that includes that being pulled into Node.js Signed-off-by: Michael Dawson <[email protected]> PR-URL: #46434 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
- Loading branch information
Showing
5 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include <sys/socket.h> | ||
#include <stddef.h> | ||
#include <errno.h> | ||
#include <assert.h> | ||
#include <stdio.h> | ||
|
||
// TODO(mhdawson): Update once sock_accept is implemented in uvwasi | ||
int main(void) { | ||
int fd = 0 ; | ||
socklen_t addrlen = 0; | ||
int flags = 0; | ||
int ret = accept(0, NULL, &addrlen); | ||
assert(ret == -1); | ||
assert(errno == ENOTSUP); | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.