From: Brad Smith Subject: UPDATE: libuv 1.53.0 To: ports@openbsd.org Cc: Volker Schlecht Date: Sun, 27 Sep 2026 00:39:34 -0400 Here is an update to libuv 1.53.0. Includes my patch for getexecpath() support. Test suite looks good. Tested on aarch64. Index: Makefile =================================================================== RCS file: /cvs/ports/devel/libuv/Makefile,v retrieving revision 1.35 diff -u -p -u -p -r1.35 Makefile --- Makefile 16 Sep 2026 16:32:16 -0000 1.35 +++ Makefile 26 Sep 2026 23:26:38 -0000 @@ -1,12 +1,11 @@ COMMENT = multi-platform library for asynchronous I/O -VER = 1.52.1 +VER = 1.53.0 DISTNAME = libuv-v${VER} PKGNAME = libuv-${VER} CATEGORIES = devel -REVISION = 0 -SHARED_LIBS += uv 5.3 # 1.0 +SHARED_LIBS += uv 5.4 # 1.0 HOMEPAGE = https://libuv.org/ Index: distinfo =================================================================== RCS file: /cvs/ports/devel/libuv/distinfo,v retrieving revision 1.14 diff -u -p -u -p -r1.14 distinfo --- distinfo 8 Mar 2026 15:14:43 -0000 1.14 +++ distinfo 26 Sep 2026 23:26:38 -0000 @@ -1,2 +1,2 @@ -SHA256 (libuv-v1.52.1.tar.gz) = ZtURuebjNMDmInnrI0+/srMRCxR5wJuVtEx6/KjP+ec= -SIZE (libuv-v1.52.1.tar.gz) = 1354296 +SHA256 (libuv-v1.53.0.tar.gz) = yw1t0hKNWpW9JCxsyYKiT+YI+pPaV7a07HY7ABjFPmQ= +SIZE (libuv-v1.53.0.tar.gz) = 1391596 Index: patches/patch-src_unix_openbsd_c =================================================================== RCS file: patches/patch-src_unix_openbsd_c diff -N patches/patch-src_unix_openbsd_c --- patches/patch-src_unix_openbsd_c 16 Sep 2026 16:32:20 -0000 1.6 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,25 +0,0 @@ -Index: src/unix/openbsd.c ---- src/unix/openbsd.c.orig -+++ src/unix/openbsd.c -@@ -59,15 +59,17 @@ void uv_loadavg(double avg[3]) { - - - int uv_exepath(char* buffer, size_t* size) { -+ - if (buffer == NULL || size == NULL || *size == 0) - return UV_EINVAL; - -- if (uv_saved_argv0 == NULL) -- return UV_EINVAL; -+ if (getexecpath(buffer, *size) == -1) -+ return UV__ERR(errno); - -- return uv__search_path(uv_saved_argv0, buffer, size); --} -+ *size = strlen(buffer); - -+ return 0; -+} - - uint64_t uv_get_free_memory(void) { - struct uvmexp info; Index: patches/patch-test_test-get-currentexe_c =================================================================== RCS file: patches/patch-test_test-get-currentexe_c diff -N patches/patch-test_test-get-currentexe_c --- patches/patch-test_test-get-currentexe_c 16 Sep 2026 16:32:20 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,33 +0,0 @@ -On OpenBSD we expect an error instead of a silently truncated result in -all cases in which the buffer size is too small to hold the path. - -Index: test/test-get-currentexe.c ---- test/test-get-currentexe.c.orig -+++ test/test-get-currentexe.c -@@ -75,18 +75,26 @@ TEST_IMPL(get_currentexe) { - - size = 1; - r = uv_exepath(buffer, &size); -+#ifndef __OpenBSD__ - ASSERT_OK(r); - ASSERT_OK(size); - ASSERT_EQ(buffer[0], '\0'); -+#else -+ ASSERT(r); -+#endif - - memset(buffer, -1, sizeof(buffer)); - - size = 2; - r = uv_exepath(buffer, &size); -+#ifndef __OpenBSD__ - ASSERT_OK(r); - ASSERT_EQ(1, size); - ASSERT_NE(buffer[0], '\0'); - ASSERT_EQ(buffer[1], '\0'); -+#else -+ ASSERT(r); -+#endif - - /* Verify uv_exepath is not affected by uv_set_process_title(). */ - r = uv_set_process_title("foobar");