1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 10:27:35 +00:00

Ports/libuv: Update libuv to version 1.44.1

Part of the build-Add-platform-specific-stubs-and-implementation
was upstreamed.
This commit is contained in:
EWouters 2022-04-01 03:39:46 +02:00 committed by Brian Gianforcaro
parent db4370992f
commit f0ded32200
3 changed files with 4 additions and 29 deletions

View file

@ -30,7 +30,7 @@ new file mode 100644
index 0000000..821cf37
--- /dev/null
+++ b/src/unix/serenity-core.c
@@ -0,0 +1,137 @@
@@ -0,0 +1,112 @@
+#include "uv.h"
+#include "internal.h"
+
@ -62,31 +62,6 @@ index 0000000..821cf37
+ uv__free(addresses);
+}
+
+static int uv__slurp(const char* filename, char* buf, size_t len) {
+ ssize_t n;
+ int fd;
+
+ assert(len > 0);
+
+ fd = uv__open_cloexec(filename, O_RDONLY);
+ if (fd < 0)
+ return fd;
+
+ do
+ n = read(fd, buf, len - 1);
+ while (n == -1 && errno == EINTR);
+
+ if (uv__close_nocheckstdio(fd))
+ abort();
+
+ if (n < 0)
+ return UV__ERR(errno);
+
+ buf[n] = '\0';
+
+ return 0;
+}
+
+
+static uint64_t uv__read_proc_memstat(const char* what) {
+ uint64_t rc;