Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/v1.x' into v1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTechsTech committed Dec 15, 2023
2 parents 7b4219f + 1479b76 commit 2ed8eef
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 28 deletions.
1 change: 1 addition & 0 deletions src/idna.c
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@ void uv_wtf8_to_utf16(const char* source_ptr,
}
} while (*source_ptr++);

(void)w_target_len;
assert(w_target_len == 0);
}

Expand Down
31 changes: 4 additions & 27 deletions src/unix/linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,16 @@
#include <errno.h>

#include <fcntl.h>
#include <ifaddrs.h>
#include <net/ethernet.h>
#include <net/if.h>
#include <netpacket/packet.h>
#include <sys/epoll.h>
#include <sys/inotify.h>
#include <sys/mman.h>
#include <sys/param.h>
#include <sys/prctl.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/syscall.h>
#include <sys/sysinfo.h>
Expand Down Expand Up @@ -120,25 +124,6 @@
# endif
#endif /* __NR_getrandom */

#define HAVE_IFADDRS_H 1

# if defined(__ANDROID_API__) && __ANDROID_API__ < 24
# undef HAVE_IFADDRS_H
#endif

#ifdef __UCLIBC__
# if __UCLIBC_MAJOR__ < 0 && __UCLIBC_MINOR__ < 9 && __UCLIBC_SUBLEVEL__ < 32
# undef HAVE_IFADDRS_H
# endif
#endif

#ifdef HAVE_IFADDRS_H
# include <ifaddrs.h>
# include <sys/socket.h>
# include <net/ethernet.h>
# include <netpacket/packet.h>
#endif /* HAVE_IFADDRS_H */

enum {
UV__IORING_SETUP_SQPOLL = 2u,
};
Expand Down Expand Up @@ -1916,7 +1901,6 @@ int uv_cpu_info(uv_cpu_info_t** ci, int* count) {
}


#ifdef HAVE_IFADDRS_H
static int uv__ifaddr_exclude(struct ifaddrs *ent, int exclude_type) {
if (!((ent->ifa_flags & IFF_UP) && (ent->ifa_flags & IFF_RUNNING)))
return 1;
Expand All @@ -1930,14 +1914,8 @@ static int uv__ifaddr_exclude(struct ifaddrs *ent, int exclude_type) {
return exclude_type;
return !exclude_type;
}
#endif

int uv_interface_addresses(uv_interface_address_t** addresses, int* count) {
#ifndef HAVE_IFADDRS_H
*count = 0;
*addresses = NULL;
return UV_ENOSYS;
#else
struct ifaddrs *addrs, *ent;
uv_interface_address_t* address;
int i;
Expand Down Expand Up @@ -2016,7 +1994,6 @@ int uv_interface_addresses(uv_interface_address_t** addresses, int* count) {
freeifaddrs(addrs);

return 0;
#endif
}


Expand Down
3 changes: 2 additions & 1 deletion test/test-tcp-write-in-a-row.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,9 @@ static void start_server(void) {
TEST_IMPL(tcp_write_in_a_row) {
#if defined(_WIN32)
RETURN_SKIP("tcp_write_in_a_row does not work on Windows");
#elif defined(__PASE__)
RETURN_SKIP("tcp_write_in_a_row does not work on IBM i PASE");
#else

uv_connect_t connect_req;
struct sockaddr_in addr;

Expand Down

0 comments on commit 2ed8eef

Please sign in to comment.