From 606a3982f34d777f121fcc4aa964141199676c20 Mon Sep 17 00:00:00 2001 From: Tim Schumacher Date: Thu, 9 Feb 2023 03:02:46 +0100 Subject: LibCore: Move Stream-based file into the `Core` namespace --- .../0008-java.base-Enable-java.lang.Process-on-serenity.patch | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Ports') diff --git a/Ports/OpenJDK/patches/0008-java.base-Enable-java.lang.Process-on-serenity.patch b/Ports/OpenJDK/patches/0008-java.base-Enable-java.lang.Process-on-serenity.patch index 50763e01ce..15fd209e62 100644 --- a/Ports/OpenJDK/patches/0008-java.base-Enable-java.lang.Process-on-serenity.patch +++ b/Ports/OpenJDK/patches/0008-java.base-Enable-java.lang.Process-on-serenity.patch @@ -50,7 +50,7 @@ new file mode 100644 index 0000000000000000000000000000000000000000..cc0c08cb85a682d66a00f6b48ad2871f83b5e719 --- /dev/null +++ b/src/java.base/serenity/native/libjava/ProcessHandleImpl_serenity.cpp -@@ -0,0 +1,165 @@ +@@ -0,0 +1,166 @@ +/* + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -89,6 +89,7 @@ index 0000000000000000000000000000000000000000..cc0c08cb85a682d66a00f6b48ad2871f + +#include +#include ++#include +#include +#include +#include @@ -189,7 +190,7 @@ index 0000000000000000000000000000000000000000..cc0c08cb85a682d66a00f6b48ad2871f + unix_getUserInfo(env, jinfo, proc.pid); + JNU_CHECK_EXCEPTION(env); + -+ auto cmdline_file = JAVA_TRY(Core::Stream::File::open(DeprecatedString::formatted("/proc/{}/cmdline", pid), Core::Stream::OpenMode::Read), "Unable to open /proc/pid/cmdline"sv); ++ auto cmdline_file = JAVA_TRY(Core::File::open(DeprecatedString::formatted("/proc/{}/cmdline", pid), Core::File::OpenMode::Read), "Unable to open /proc/pid/cmdline"sv); + auto contents = JAVA_TRY(cmdline_file->read_until_eof(), "Unable to read /proc/pid/cmdline"sv); + auto cmdline = JAVA_TRY(JsonValue::from_string(contents), "Invalid JSON in /proc/pid/cmdline"sv); + -- cgit v1.2.3