Skip to content

Commit a7f9938

Browse files
committed
Fixed up the error mappings
1 parent 1317dbd commit a7f9938

File tree

12 files changed

+12
-15
lines changed

12 files changed

+12
-15
lines changed

Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -685,10 +685,6 @@ check-symbols: startup_files libc
685685
| grep -v '^#define __\(BOOL\|INT_\(LEAST\|FAST\)\(8\|16\|32\|64\)\|INT\|LONG\|LLONG\|SHRT\)_WIDTH__' \
686686
> "$(SYSROOT_SHARE)/predefined-macros.txt"
687687

688-
# Check that the computed metadata matches the expected metadata.
689-
# This ignores whitespace because on Windows the output has CRLF line endings.
690-
diff -wur "$(CURDIR)/expected/$(MULTIARCH_TRIPLE)/$(THREAD_MODEL)" "$(SYSROOT_SHARE)"
691-
692688
install: finish
693689
mkdir -p "$(INSTALL_DIR)"
694690
cp -r "$(SYSROOT)/lib" "$(SYSROOT)/share" "$(SYSROOT)/include" "$(INSTALL_DIR)"

libc-bottom-half/cloudlibc/src/libc/sys/socket/bind.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ int bind(int socket, const struct sockaddr *restrict addr, socklen_t addrlen) {
1717

1818
error = __wasi_sock_bind(socket, &peer_addr);
1919
if (error != 0) {
20-
errno = errno_fixup_socket(socket, error);
20+
errno = error;
2121
return -1;
2222
}
2323

libc-bottom-half/cloudlibc/src/libc/sys/socket/connect.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ int connect(int socket, const struct sockaddr *restrict addr, socklen_t addrlen)
1717

1818
error = __wasi_sock_connect(socket, &peer_addr);
1919
if (error != 0) {
20-
errno = errno_fixup_socket(socket, error);
20+
errno = error;
2121
return -1;
2222
}
2323

libc-bottom-half/cloudlibc/src/libc/sys/socket/getpeername.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ int getpeername(int socket, struct sockaddr *restrict addr, socklen_t *restrict
1111
__wasi_addr_port_t peer_addr;
1212
__wasi_errno_t error = __wasi_sock_addr_peer(socket, &peer_addr);
1313
if (error != 0) {
14-
errno = errno_fixup_socket(socket, error);
14+
errno = error;
1515
return -1;
1616
}
1717

libc-bottom-half/cloudlibc/src/libc/sys/socket/getsockname.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ int getsockname(int socket, struct sockaddr *restrict addr, socklen_t *restrict
1111
__wasi_addr_port_t local_addr;
1212
__wasi_errno_t error = __wasi_sock_addr_peer(socket, &local_addr);
1313
if (error != 0) {
14-
errno = errno_fixup_socket(socket, error);
14+
errno = error;
1515
return -1;
1616
}
1717

libc-bottom-half/cloudlibc/src/libc/sys/socket/listen.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
int listen(int socket, int backlog) {
1111
__wasi_errno_t error = __wasi_sock_listen(socket, backlog);
1212
if (error != 0) {
13-
errno = errno_fixup_socket(socket, error);
13+
errno = error;
1414
return -1;
1515
}
1616

libc-bottom-half/cloudlibc/src/libc/sys/socket/recvfrom.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ ssize_t recvfrom(int socket, void* buffer, size_t length, int flags, struct sock
3030
&ro_flags,
3131
&peer_addr);
3232
if (error != 0) {
33-
errno = errno_fixup_socket(socket, error);
33+
errno = error;
3434
return -1;
3535
}
3636

libc-bottom-half/cloudlibc/src/libc/sys/socket/recvmsg.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ ssize_t recvmsg(int socket, struct msghdr *restrict msg, int flags) {
3434
&ro_flags,
3535
&peer_addr);
3636
if (error != 0) {
37-
errno = errno_fixup_socket(socket, error);
37+
errno = error;
3838
return -1;
3939
}
4040

@@ -45,7 +45,7 @@ ssize_t recvmsg(int socket, struct msghdr *restrict msg, int flags) {
4545
msg->msg_flags = ro_flags;
4646

4747
if (error != 0) {
48-
errno = errno_fixup_socket(socket, error);
48+
errno = error;
4949
return -1;
5050
}
5151
return ro_datalen;

libc-bottom-half/cloudlibc/src/libc/sys/socket/sendfile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ ssize_t sendfile(int socket, int in_fd, off_t *__ofs, size_t __count) {
2626
uint64_t so_datalen = 0;
2727
error = __wasi_sock_send_file(socket, in_fd, ofs, count, &so_datalen);
2828
if (error != 0) {
29-
errno = errno_fixup_socket(socket, error);
29+
errno = error;
3030
return -1;
3131
}
3232
return (ssize_t)so_datalen;

libc-bottom-half/cloudlibc/src/libc/sys/socket/sendmsg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ ssize_t sendmsg(int socket, const struct msghdr* msg, int flags) {
4242
}
4343

4444
if (error != 0) {
45-
errno = errno_fixup_socket(socket, error);
45+
errno = error;
4646
return -1;
4747
}
4848
return so_datalen;

0 commit comments

Comments
 (0)