0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-24 03:07:54 +01:00
nodejs/test/wasi/c/sock.c
Michael Dawson d37b0d267f wasi: updates required for latest uvwasi version
Signed-off-by: Michael Dawson <midawson@redhat.com>

PR-URL: https://github.com/nodejs/node/pull/49908
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-09-29 15:16:51 -04:00

18 lines
347 B
C

#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(10, NULL, &addrlen);
assert(ret == -1);
assert(errno == EBADF);
return 0;
}