Skip to content

Commit 148a17b

Browse files
cjihrigzcbenz
authored andcommitted
deps: upgrade to libuv 1.34.2
Notable changes: - SetApplicationDaemon() is no longer called on macOS. - uv_interface_addresses() is implemented on IBMi. - The return value of uv__open_cloexec() is now handled properly. - A race condition in fsevents has been fixed. Fixes: nodejs/node#31328 Fixes: nodejs/help#2099 PR-URL: nodejs/node#31477 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: David Carlier <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent 8cec984 commit 148a17b

16 files changed

+491
-243
lines changed

deps/uv/ChangeLog

+23
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
2020.01.24, Version 1.34.2 (Stable), f868c9ab0c307525a16fff99fd21e32a6ebc3837
2+
3+
Changes since version 1.34.1:
4+
5+
* misc: adjust stalebot deadlines (Jameson Nash)
6+
7+
* test: fix env-vars flakiness (cjihrig)
8+
9+
* test: avoid truncating output lines (Jameson Nash)
10+
11+
* darwin: stop calling SetApplicationIsDaemon() (Ben Noordhuis)
12+
13+
* ibmi: implement uv_interface_addresses() (Xu Meng)
14+
15+
* osx,fsevent: fix race during uv_loop_close (Jameson Nash)
16+
17+
* osx,fsevent: clear pointer when deleting it [NFCI] (Jameson Nash)
18+
19+
* Revert "aix: replace ECONNRESET with EOF if already closed" (Jameson Nash)
20+
21+
* unix: handle uv__open_cloexec return value correctly (Anna Henningsen)
22+
23+
124
2020.01.13, Version 1.34.1 (Stable), 8aa5636ec72990bb2856f81e14c95813024a5c2b
225

326
Changes since version 1.34.0:

deps/uv/configure.ac

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1414

1515
AC_PREREQ(2.57)
16-
AC_INIT([libuv], [1.34.1], [https://github.com/libuv/libuv/issues])
16+
AC_INIT([libuv], [1.34.2], [https://github.com/libuv/libuv/issues])
1717
AC_CONFIG_MACRO_DIR([m4])
1818
m4_include([m4/libuv-extra-automake-flags.m4])
1919
m4_include([m4/as_case.m4])

deps/uv/include/uv/version.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
#define UV_VERSION_MAJOR 1
3434
#define UV_VERSION_MINOR 34
35-
#define UV_VERSION_PATCH 1
35+
#define UV_VERSION_PATCH 2
3636
#define UV_VERSION_IS_RELEASE 1
3737
#define UV_VERSION_SUFFIX ""
3838

deps/uv/src/unix/aix-common.c

-180
Original file line numberDiff line numberDiff line change
@@ -155,183 +155,3 @@ int uv_exepath(char* buffer, size_t* size) {
155155
return UV_EINVAL;
156156
}
157157
}
158-
159-
160-
int uv_interface_addresses(uv_interface_address_t** addresses, int* count) {
161-
uv_interface_address_t* address;
162-
int sockfd, sock6fd, inet6, i, r, size = 1;
163-
struct ifconf ifc;
164-
struct ifreq *ifr, *p, flg;
165-
struct in6_ifreq if6;
166-
struct sockaddr_dl* sa_addr;
167-
168-
ifc.ifc_req = NULL;
169-
sock6fd = -1;
170-
r = 0;
171-
*count = 0;
172-
*addresses = NULL;
173-
174-
if (0 > (sockfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP))) {
175-
r = UV__ERR(errno);
176-
goto cleanup;
177-
}
178-
179-
if (0 > (sock6fd = socket(AF_INET6, SOCK_DGRAM, IPPROTO_IP))) {
180-
r = UV__ERR(errno);
181-
goto cleanup;
182-
}
183-
184-
if (ioctl(sockfd, SIOCGSIZIFCONF, &size) == -1) {
185-
r = UV__ERR(errno);
186-
goto cleanup;
187-
}
188-
189-
ifc.ifc_req = (struct ifreq*)uv__malloc(size);
190-
if (ifc.ifc_req == NULL) {
191-
r = UV_ENOMEM;
192-
goto cleanup;
193-
}
194-
ifc.ifc_len = size;
195-
if (ioctl(sockfd, SIOCGIFCONF, &ifc) == -1) {
196-
r = UV__ERR(errno);
197-
goto cleanup;
198-
}
199-
200-
#define ADDR_SIZE(p) MAX((p).sa_len, sizeof(p))
201-
202-
/* Count all up and running ipv4/ipv6 addresses */
203-
ifr = ifc.ifc_req;
204-
while ((char*)ifr < (char*)ifc.ifc_req + ifc.ifc_len) {
205-
p = ifr;
206-
ifr = (struct ifreq*)
207-
((char*)ifr + sizeof(ifr->ifr_name) + ADDR_SIZE(ifr->ifr_addr));
208-
209-
if (!(p->ifr_addr.sa_family == AF_INET6 ||
210-
p->ifr_addr.sa_family == AF_INET))
211-
continue;
212-
213-
memcpy(flg.ifr_name, p->ifr_name, sizeof(flg.ifr_name));
214-
if (ioctl(sockfd, SIOCGIFFLAGS, &flg) == -1) {
215-
r = UV__ERR(errno);
216-
goto cleanup;
217-
}
218-
219-
if (!(flg.ifr_flags & IFF_UP && flg.ifr_flags & IFF_RUNNING))
220-
continue;
221-
222-
(*count)++;
223-
}
224-
225-
if (*count == 0)
226-
goto cleanup;
227-
228-
/* Alloc the return interface structs */
229-
*addresses = uv__calloc(*count, sizeof(**addresses));
230-
if (!(*addresses)) {
231-
r = UV_ENOMEM;
232-
goto cleanup;
233-
}
234-
address = *addresses;
235-
236-
ifr = ifc.ifc_req;
237-
while ((char*)ifr < (char*)ifc.ifc_req + ifc.ifc_len) {
238-
p = ifr;
239-
ifr = (struct ifreq*)
240-
((char*)ifr + sizeof(ifr->ifr_name) + ADDR_SIZE(ifr->ifr_addr));
241-
242-
if (!(p->ifr_addr.sa_family == AF_INET6 ||
243-
p->ifr_addr.sa_family == AF_INET))
244-
continue;
245-
246-
inet6 = (p->ifr_addr.sa_family == AF_INET6);
247-
248-
memcpy(flg.ifr_name, p->ifr_name, sizeof(flg.ifr_name));
249-
if (ioctl(sockfd, SIOCGIFFLAGS, &flg) == -1)
250-
goto syserror;
251-
252-
if (!(flg.ifr_flags & IFF_UP && flg.ifr_flags & IFF_RUNNING))
253-
continue;
254-
255-
/* All conditions above must match count loop */
256-
257-
address->name = uv__strdup(p->ifr_name);
258-
259-
if (inet6)
260-
address->address.address6 = *((struct sockaddr_in6*) &p->ifr_addr);
261-
else
262-
address->address.address4 = *((struct sockaddr_in*) &p->ifr_addr);
263-
264-
if (inet6) {
265-
memset(&if6, 0, sizeof(if6));
266-
r = uv__strscpy(if6.ifr_name, p->ifr_name, sizeof(if6.ifr_name));
267-
if (r == UV_E2BIG)
268-
goto cleanup;
269-
r = 0;
270-
memcpy(&if6.ifr_Addr, &p->ifr_addr, sizeof(if6.ifr_Addr));
271-
if (ioctl(sock6fd, SIOCGIFNETMASK6, &if6) == -1)
272-
goto syserror;
273-
address->netmask.netmask6 = *((struct sockaddr_in6*) &if6.ifr_Addr);
274-
/* Explicitly set family as the ioctl call appears to return it as 0. */
275-
address->netmask.netmask6.sin6_family = AF_INET6;
276-
} else {
277-
if (ioctl(sockfd, SIOCGIFNETMASK, p) == -1)
278-
goto syserror;
279-
address->netmask.netmask4 = *((struct sockaddr_in*) &p->ifr_addr);
280-
/* Explicitly set family as the ioctl call appears to return it as 0. */
281-
address->netmask.netmask4.sin_family = AF_INET;
282-
}
283-
284-
address->is_internal = flg.ifr_flags & IFF_LOOPBACK ? 1 : 0;
285-
286-
address++;
287-
}
288-
289-
/* Fill in physical addresses. */
290-
ifr = ifc.ifc_req;
291-
while ((char*)ifr < (char*)ifc.ifc_req + ifc.ifc_len) {
292-
p = ifr;
293-
ifr = (struct ifreq*)
294-
((char*)ifr + sizeof(ifr->ifr_name) + ADDR_SIZE(ifr->ifr_addr));
295-
296-
if (p->ifr_addr.sa_family != AF_LINK)
297-
continue;
298-
299-
address = *addresses;
300-
for (i = 0; i < *count; i++) {
301-
if (strcmp(address->name, p->ifr_name) == 0) {
302-
sa_addr = (struct sockaddr_dl*) &p->ifr_addr;
303-
memcpy(address->phys_addr, LLADDR(sa_addr), sizeof(address->phys_addr));
304-
}
305-
address++;
306-
}
307-
}
308-
309-
#undef ADDR_SIZE
310-
goto cleanup;
311-
312-
syserror:
313-
uv_free_interface_addresses(*addresses, *count);
314-
*addresses = NULL;
315-
*count = 0;
316-
r = UV_ENOSYS;
317-
318-
cleanup:
319-
if (sockfd != -1)
320-
uv__close(sockfd);
321-
if (sock6fd != -1)
322-
uv__close(sock6fd);
323-
uv__free(ifc.ifc_req);
324-
return r;
325-
}
326-
327-
328-
void uv_free_interface_addresses(uv_interface_address_t* addresses,
329-
int count) {
330-
int i;
331-
332-
for (i = 0; i < count; ++i) {
333-
uv__free(addresses[i].name);
334-
}
335-
336-
uv__free(addresses);
337-
}

0 commit comments

Comments
 (0)