diff options
author | Antoine Brodin <antoine@FreeBSD.org> | 2021-01-01 10:11:34 +0000 |
---|---|---|
committer | Antoine Brodin <antoine@FreeBSD.org> | 2021-01-01 10:11:34 +0000 |
commit | 26b4c8f71f91d22e081b27814782686edde0c90a (patch) | |
tree | 1c321c39372c25d8634e75b5c8e08edc676b296d /www/iridium/files/patch-base_process_process__handle__freebsd.cc | |
parent | New port: math/py-optuna: A hyperparameter optimization framework (diff) |
Revert r559792 to unbreak INDEX and bulk -a
It seems a lot of reverse dependencies were missed
With hat: portmgr
Diffstat (limited to 'www/iridium/files/patch-base_process_process__handle__freebsd.cc')
-rw-r--r-- | www/iridium/files/patch-base_process_process__handle__freebsd.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/www/iridium/files/patch-base_process_process__handle__freebsd.cc b/www/iridium/files/patch-base_process_process__handle__freebsd.cc new file mode 100644 index 000000000000..13a07c3075fd --- /dev/null +++ b/www/iridium/files/patch-base_process_process__handle__freebsd.cc @@ -0,0 +1,17 @@ +--- base/process/process_handle_freebsd.cc.orig 2019-03-11 22:00:51 UTC ++++ base/process/process_handle_freebsd.cc +@@ -16,10 +16,13 @@ namespace base { + + ProcessId GetParentProcessId(ProcessHandle process) { + struct kinfo_proc info; +- size_t length; ++ size_t length = sizeof(struct kinfo_proc); + int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process }; + + if (sysctl(mib, base::size(mib), &info, &length, NULL, 0) < 0) ++ return -1; ++ ++ if (length < sizeof(struct kinfo_proc)) + return -1; + + return info.ki_ppid; |