ports/www/ungoogled-chromium/patches/patch-base_linux_util_cc

27 lines
687 B
Text
Raw Normal View History

2023-08-16 22:26:55 +00:00
Index: base/linux_util.cc
--- base/linux_util.cc.orig
+++ base/linux_util.cc
@@ -15,6 +15,7 @@
#include <iomanip>
#include <memory>
+#include <sstream>
#include "base/base_export.h"
#include "base/files/dir_reader_posix.h"
2024-05-20 13:42:05 +00:00
@@ -153,10 +154,14 @@ void SetLinuxDistro(const std::string& distro) {
2023-08-16 22:26:55 +00:00
}
bool GetThreadsForProcess(pid_t pid, std::vector<pid_t>* tids) {
2023-09-17 04:05:06 +00:00
+#if BUILDFLAG(IS_BSD)
2023-08-16 22:26:55 +00:00
+ return false;
+#else
// 25 > strlen("/proc//task") + strlen(std::to_string(INT_MAX)) + 1 = 22
char buf[25];
strings::SafeSPrintf(buf, "/proc/%d/task", pid);
2024-05-20 13:42:05 +00:00
return GetThreadsFromProcessDir(buf, tids);
2023-08-16 22:26:55 +00:00
+#endif
}
2024-05-20 13:42:05 +00:00
bool GetThreadsForCurrentProcess(std::vector<pid_t>* tids) {