pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
webkit-gtk: fix two bugs in procfs handling
Module Name: pkgsrc-wip
Committed By: Thomas Klausner <wiz%NetBSD.org@localhost>
Pushed By: wiz
Date: Fri Apr 24 17:51:29 2026 +0200
Changeset: 9658a18dacc98c0291b4585520c12fee57d233a0
Added Files:
webkit-gtk/patches/patch-Source_WTF_wtf_glib_FileSystemGlib.cpp
Log Message:
webkit-gtk: fix two bugs in procfs handling
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=9658a18dacc98c0291b4585520c12fee57d233a0
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
.../patch-Source_WTF_wtf_glib_FileSystemGlib.cpp | 30 ++++++++++++++++++++++
1 file changed, 30 insertions(+)
diffs:
diff --git a/webkit-gtk/patches/patch-Source_WTF_wtf_glib_FileSystemGlib.cpp b/webkit-gtk/patches/patch-Source_WTF_wtf_glib_FileSystemGlib.cpp
new file mode 100644
index 0000000000..530cf206bc
--- /dev/null
+++ b/webkit-gtk/patches/patch-Source_WTF_wtf_glib_FileSystemGlib.cpp
@@ -0,0 +1,30 @@
+$NetBSD$
+
+The file name link has a different name in NetBSD's procfs than on Linux.
+Avoid providing zero-length paths.
+
+--- Source/WTF/wtf/glib/FileSystemGlib.cpp.orig 2026-04-23 20:09:38.532658486 +0000
++++ Source/WTF/wtf/glib/FileSystemGlib.cpp
+@@ -89,12 +89,21 @@ CString currentExecutablePath()
+ return { };
+ return CString(unsafeMakeSpan(readBuffer, static_cast<size_t>(result)));
+ }
++#elif OS(NETBSD)
++CString currentExecutablePath()
++{
++ static char readLinkBuffer[PATH_MAX];
++ ssize_t result = readlink("/proc/curproc/exe", readLinkBuffer, PATH_MAX);
++ if (result <= 0)
++ return { };
++ return CString(unsafeMakeSpan(readLinkBuffer, static_cast<size_t>(result)));
++}
+ #elif OS(UNIX)
+ CString currentExecutablePath()
+ {
+ static char readLinkBuffer[PATH_MAX];
+ ssize_t result = readlink("/proc/curproc/file", readLinkBuffer, PATH_MAX);
+- if (result == -1)
++ if (result <= 0)
+ return { };
+ return CString(unsafeMakeSpan(readLinkBuffer, static_cast<size_t>(result)));
+ }
Home |
Main Index |
Thread Index |
Old Index