libc: fix local from-source upgrades
Commit git-c38dbb9 inadvertently broke local MINIX3-on-MINIX3 builds, since its libc changes relied on VFS being upgraded already as well. As a result, after installing the new libc, networking ceased to work, leading to curl(1) failing later on in the build process. This patch introduces transitional code that is necessary for the build process to complete, after which it is obsolete again. Change-Id: I93bf29c01d228e3d7efc7b01befeff682954f54d
This commit is contained in:
parent
a3975fbc35
commit
84ed480ef7
@ -60,7 +60,7 @@ int accept(int sock, struct sockaddr *__restrict address,
|
||||
nwio_udpopt_t udpopt;
|
||||
|
||||
r = __accept(sock, address, address_len);
|
||||
if (r != -1 || errno != ENOTSOCK)
|
||||
if (r != -1 || (errno != ENOTSOCK && errno != ENOSYS))
|
||||
return r;
|
||||
|
||||
r= _tcp_accept(sock, address, address_len);
|
||||
|
@ -58,7 +58,7 @@ int bind(int sock, const struct sockaddr *address, socklen_t address_len)
|
||||
struct sockaddr_un uds_addr;
|
||||
|
||||
r = __bind(sock, address, address_len);
|
||||
if (r != -1 || errno != ENOTSOCK)
|
||||
if (r != -1 || (errno != ENOTSOCK && errno != ENOSYS))
|
||||
return r;
|
||||
|
||||
r= ioctl(sock, NWIOGTCPCONF, &tcpconf);
|
||||
|
@ -57,7 +57,7 @@ int connect(int sock, const struct sockaddr *address,
|
||||
nwio_udpopt_t udpopt;
|
||||
|
||||
r = __connect(sock, address, address_len);
|
||||
if (r != -1 || errno != ENOTSOCK)
|
||||
if (r != -1 || (errno != ENOTSOCK && errno != ENOSYS))
|
||||
return r;
|
||||
|
||||
r= ioctl(sock, NWIOGTCPCONF, &tcpconf);
|
||||
|
@ -60,7 +60,7 @@ int getpeername(int sock, struct sockaddr *__restrict address,
|
||||
struct sockaddr_un uds_addr;
|
||||
|
||||
r = __getpeername(sock, address, address_len);
|
||||
if (r != -1 || errno != ENOTSOCK)
|
||||
if (r != -1 || (errno != ENOTSOCK && errno != ENOSYS))
|
||||
return r;
|
||||
|
||||
r= ioctl(sock, NWIOGTCPCONF, &tcpconf);
|
||||
|
@ -62,7 +62,7 @@ int getsockname(int fd, struct sockaddr *__restrict address,
|
||||
struct sockaddr_un uds_addr;
|
||||
|
||||
r = __getsockname(fd, address, address_len);
|
||||
if (r != -1 || errno != ENOTSOCK)
|
||||
if (r != -1 || (errno != ENOTSOCK && errno != ENOSYS))
|
||||
return r;
|
||||
|
||||
#if DEBUG
|
||||
|
@ -68,7 +68,7 @@ int getsockopt(int sock, int level, int option_name,
|
||||
struct sockaddr_un uds_addr;
|
||||
|
||||
r = __getsockopt(sock, level, option_name, option_value, option_len);
|
||||
if (r != -1 || errno != ENOTSOCK)
|
||||
if (r != -1 || (errno != ENOTSOCK && errno != ENOSYS))
|
||||
return r;
|
||||
|
||||
r= ioctl(sock, NWIOGTCPOPT, &tcpopt);
|
||||
|
@ -35,7 +35,7 @@ int listen(int sock, int backlog)
|
||||
int r;
|
||||
|
||||
r = __listen(sock, backlog);
|
||||
if (r != -1 || errno != ENOTSOCK)
|
||||
if (r != -1 || (errno != ENOTSOCK && errno != ENOSYS))
|
||||
return r;
|
||||
|
||||
r= ioctl(sock, NWIOTCPLISTENQ, &backlog);
|
||||
|
@ -81,7 +81,7 @@ ssize_t recvfrom(int sock, void *__restrict buffer, size_t length,
|
||||
int uds_sotype = -1;
|
||||
|
||||
r = __recvfrom(sock, buffer, length, flags, address, address_len);
|
||||
if (r != -1 || errno != ENOTSOCK)
|
||||
if (r != -1 || (errno != ENOTSOCK && errno != ENOSYS))
|
||||
return r;
|
||||
|
||||
#if DEBUG
|
||||
|
@ -90,7 +90,7 @@ ssize_t recvmsg(int sock, struct msghdr *msg, int flags)
|
||||
int uds_sotype;
|
||||
|
||||
r = __recvmsg(sock, msg, flags);
|
||||
if (r != -1 || errno != ENOTSOCK)
|
||||
if (r != -1 || (errno != ENOTSOCK && errno != ENOSYS))
|
||||
return r;
|
||||
|
||||
if (msg == NULL) {
|
||||
|
@ -88,7 +88,7 @@ ssize_t sendmsg(int sock, const struct msghdr *msg, int flags)
|
||||
int uds_sotype;
|
||||
|
||||
r = __sendmsg(sock, msg, flags);
|
||||
if (r != -1 || errno != ENOTSOCK)
|
||||
if (r != -1 || (errno != ENOTSOCK && errno != ENOSYS))
|
||||
return r;
|
||||
|
||||
if (msg == NULL) {
|
||||
|
@ -63,7 +63,7 @@ ssize_t sendto(int sock, const void *message, size_t length, int flags,
|
||||
int uds_sotype = -1;
|
||||
|
||||
r = __sendto(sock, message, length, flags, dest_addr, dest_len);
|
||||
if (r != -1 || errno != ENOTSOCK)
|
||||
if (r != -1 || (errno != ENOTSOCK && errno != ENOSYS))
|
||||
return r;
|
||||
|
||||
r= ioctl(sock, NWIOGTCPOPT, &tcpopt);
|
||||
|
@ -56,7 +56,7 @@ int setsockopt(int sock, int level, int option_name,
|
||||
struct sockaddr_un uds_addr;
|
||||
|
||||
r = __setsockopt(sock, level, option_name, option_value, option_len);
|
||||
if (r != -1 || errno != ENOTSOCK)
|
||||
if (r != -1 || (errno != ENOTSOCK && errno != ENOSYS))
|
||||
return r;
|
||||
|
||||
r= ioctl(sock, NWIOGTCPOPT, &tcpopt);
|
||||
|
@ -40,7 +40,7 @@ int shutdown(int sock, int how)
|
||||
nwio_tcpconf_t tcpconf;
|
||||
|
||||
r = __shutdown(sock, how);
|
||||
if (r != -1 || errno != ENOTSOCK)
|
||||
if (r != -1 || (errno != ENOTSOCK && errno != ENOSYS))
|
||||
return r;
|
||||
|
||||
r= ioctl(sock, NWIOGTCPCONF, &tcpconf);
|
||||
|
@ -60,7 +60,7 @@ int socket(int domain, int type, int protocol)
|
||||
int r, sock_type;
|
||||
|
||||
r = __socket(domain, type, protocol);
|
||||
if (r != -1 || errno != EAFNOSUPPORT)
|
||||
if (r != -1 || (errno != EAFNOSUPPORT && errno != ENOSYS))
|
||||
return r;
|
||||
|
||||
sock_type = type & ~SOCK_FLAGS_MASK;
|
||||
|
@ -45,7 +45,7 @@ socketpair(int domain, int type, int protocol, int sv[2])
|
||||
int r;
|
||||
|
||||
r = __socketpair(domain, type, protocol, sv);
|
||||
if (r != -1 || errno != EAFNOSUPPORT)
|
||||
if (r != -1 || (errno != EAFNOSUPPORT && errno != ENOSYS))
|
||||
return r;
|
||||
|
||||
#if DEBUG
|
||||
|
Loading…
x
Reference in New Issue
Block a user