Commit Graph

16 Commits

Author SHA1 Message Date
Vittore F. Scolari
7ae0c9543d
hurd: unbreak build on GNU/Hurd (#3450)
The GNU/Hurd platform does not define IP_ADD_SOURCE_MEMBERSHIP,
IP_DROP_SOURCE_MEMBERSHIP, MCAST_JOIN_SOURCE_GROUP and 
MCAST_LEAVE_SOURCE_GROUP.

Implement a few functions for the GNU/Hurd. Specifically:

* uv_resident_set_memory (from Linux)
* uv_get_free_memory (from Linux)
* uv_get_total_memory (from Linux)
* uv_cpu_info (from cygwin)
* uv__process_title_cleanup (void)
* uv_get_constrained_memory (stub)
* Leave proctitle unimplemented on Hurd for now
* Implement hurdish uv_exepath
* Enable ifaddrs api
* Unbreak udp basics
* Unbreak futime and lutime on Hurd
2022-02-23 12:04:18 -05:00
Darshan Sen
ba498cb60f
bsd-ifaddrs: improve comments
PR-URL: https://github.com/libuv/libuv/pull/3031
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Jameson Nash <vtjnash@gmail.com>
2020-11-26 00:49:10 -05:00
Elad Lahav
ed5b42d5b7
build,unix: add QNX support
Refs: https://github.com/libuv/libuv/pull/2881
PR-URL: https://github.com/libuv/libuv/pull/2991
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2020-09-22 23:14:46 -04:00
MaYuming
0ff717e39c build: fix build warning on cygwin
Signed-off-by: MaYuming <maym@appexnetworks.com>
PR-URL: https://github.com/libuv/libuv/pull/2489
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <s@saghul.net>
2019-10-04 23:54:06 +02:00
Leorize
abe4f3d58d build, core, unix: add support for Haiku
This commit add support for Haiku, an open-source operating system
inspired by BeOS.

PR-URL: https://github.com/libuv/libuv/pull/2301
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-06-07 09:57:06 +02:00
Andreas Rohner
d0fb86cdf3
unix: fix uv_interface_addresses()
The memset() in the inner loop clears previously copied phys_addrs. As a
result, every interface is reported to have a phys_addr of
00:00:00:00:00:00, except the last one. This bug only manifests on
systems with multiple interfaces.

PR-URL: https://github.com/libuv/libuv/pull/2153
Reviewed-By: Jameson Nash <vtjnash@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2019-04-10 06:52:11 +02:00
ptlomholt
8570005440
unix: enable IPv6 tests on OpenBSD
Refs: https://github.com/libuv/libuv/pull/1576
PR-URL: https://github.com/libuv/libuv/pull/2136
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-01-14 11:24:42 -05:00
cjihrig
5fb9517200
unix,win: make uv_interface_addresses() consistent
This commit does a few things to make the function more
consistent across platforms:

- Initialize the output parameters before everything else.
- Return early if there are no interfaces instead of performing
  zero-sized allocations.
- Add a missing memory deallocation.

Refs: https://github.com/libuv/libuv/pull/2035
PR-URL: https://github.com/libuv/libuv/pull/2039
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-10-15 14:49:13 -04:00
cjihrig
69e4af1577
unix: restore skipping of phys_addr copy
Prior to https://github.com/libuv/libuv/pull/1999,
uv_interface_addresses() did not populate the phys_addr field on
Cygwin or MinGW. This commit restores that behavior, which was
mistakenly changed.

Fixes: https://github.com/libuv/libuv/issues/2034
PR-URL: https://github.com/libuv/libuv/pull/2035
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2018-10-15 14:33:34 -04:00
cjihrig
3dc0f53965
unix: initialize uv_interface_address_t.phys_addr
This commit ensures that the memory of the phys_addr field is
initialized on all platforms.

Fixes: https://github.com/nodejs/node/issues/23043
PR-URL: https://github.com/libuv/libuv/pull/1999
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-09-25 09:40:22 -04:00
Mason X
89cbbc895b
include,src: introduce UV__ERR() macro
Using -errno, -E**, and -pthread_function() can be
error prone, and breaks compatibility with some operating
systems that already negate errno's (e.g. Haiku).

This commit adds a UV__ERR() macro that ensures libuv
errors are negative.

Fixes: https://github.com/libuv/help/issues/39
PR-URL: https://github.com/libuv/libuv/pull/1687
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2018-02-08 22:38:02 -05:00
Brad King
63de1ecad3 cygwin: fix compilation of ifaddrs impl
On cygwin there is no `AF_LINK`.  Skip the check for it since
we just zero the physical addresses on this platform anyway.

Fixes: https://github.com/libuv/libuv/issues/1448
PR-URL: https://github.com/libuv/libuv/pull/1719
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2018-01-19 17:57:06 +01:00
Kamil Rytarowski
001a4a11f6
netbsd: do not exclude IPv6 functionality
On NetBSD, do not exclude PF_INET6 in uv__ifaddr_exclude().

PR-URL: https://github.com/libuv/libuv/pull/1576
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-10-02 10:15:39 -04:00
XadillaX
f1e0fc43d1 unix: fix wrong MAC of uv_interface_address
fix a wrong `if` in `uv_interface_address` about MAC.

Fixes: https://github.com/nodejs/node/issues/13581
PR-URL: https://github.com/libuv/libuv/pull/1375
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-07-17 13:34:02 +02:00
Brad King
6398251aff cygwin: implement support for cygwin and msys2
Cygwin and MSYS2 are POSIX layers implemented on top of Windows.
Use our POSIX `poll(2)` implementation of our poll abstraction.
For most other components we already have dedicated sources
implementing them in terms of APIs available on Cygwin or
providing non-implementations of components not supported.

This leaves only three components that need Cygwin-specific
implementations:

* uv_uptime: implement using sysinfo
* uv_resident_set_memory: add a placeholder returning UV_ENOSYS
* uv_cpu_info: add a placeholder returning UV_ENOSYS

Update our test suite to account for features not available
due to Cygwin platform limitations or our placeholders.

PR-URL: https://github.com/libuv/libuv/pull/1312
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-05-21 16:12:21 +02:00
Brad King
f277cb6f92 unix: factor out reusable BSD ifaddrs impl
Create a dedicated source file to share among platforms on which we find
ifaddrs using the BSD getifaddrs API.  De-duplicate our existing copies
of this implementation on such platforms.

PR-URL: https://github.com/libuv/libuv/pull/1240
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2017-03-14 08:33:43 +01:00