posix_sockets: fix use of fd_new

This commit is contained in:
Sam Kumar 2017-05-12 18:43:51 -07:00
parent 6b0cf6a728
commit 331c60409e

View File

@ -442,8 +442,7 @@ int accept(int socket, struct sockaddr *restrict address,
sa_len);
}
int fd = fd_new(new_s - _socket_pool, socket_read, socket_write,
socket_close);
int fd = vfs_bind(VFS_ANY_FD, 0, &socket_ops, new_s);
if (fd < 0) {
errno = ENFILE;
res = -1;