0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-24 12:10:08 +01:00
nodejs/test/wasi/c/sock.c

18 lines
347 B
C
Raw Normal View History

#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;
}