Fix sysctl(3) call in mono_process_list() where the MIB length argument was incorrectly passed to sysctl(3)

PR:		174216
Submitted by:	tj
Approved by:	maintainer timeout
This commit is contained in:
Tom Judge 2016-10-05 17:46:10 +00:00
parent 43253f09df
commit d816ac3326
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=423356
4 changed files with 22 additions and 2 deletions

View File

@ -3,6 +3,7 @@
PORTNAME= mono
PORTVERSION= 4.4.2.11
PORTREVISION= 1
CATEGORIES= lang
MASTER_SITES= http://download.mono-project.com/sources/${PORTNAME}/

View File

@ -1,4 +1,4 @@
--- eglib/src/gfile-posix.c.orig 2015-09-24 09:36:09 UTC
--- eglib/src/gfile-posix.c.orig 2016-07-29 09:10:29 UTC
+++ eglib/src/gfile-posix.c
@@ -170,7 +170,7 @@ g_get_current_dir (void)
do {

View File

@ -1,7 +1,7 @@
Fix build on FreeBSD 8
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198404#c6
--- mono/metadata/socket-io.c.orig 2015-11-12 09:00:29 UTC
--- mono/metadata/socket-io.c.orig 2016-07-29 09:10:33 UTC
+++ mono/metadata/socket-io.c
@@ -26,6 +26,7 @@
#ifdef HOST_WIN32

View File

@ -0,0 +1,19 @@
--- mono/utils/patch-mono_utils_mono-proclib.c.orig 2016-10-05 17:28:38 UTC
+++ mono/utils/patch-mono_utils_mono-proclib.c
@@ -0,0 +1,16 @@
+--- mono/utils/mono-proclib.c.orig 2016-07-29 09:10:33 UTC
++++ mono/utils/mono-proclib.c
+@@ -107,11 +107,11 @@ mono_process_list (int *size)
+ mib [2] = KERN_PROC_ALL;
+ mib [3] = 0;
+
+- res = sysctl (mib, 4, NULL, &data_len, NULL, 0);
++ res = sysctl (mib, 3, NULL, &data_len, NULL, 0);
+ if (res)
+ return NULL;
+ processes = (struct kinfo_proc *) malloc (data_len);
+- res = sysctl (mib, 4, processes, &data_len, NULL, 0);
++ res = sysctl (mib, 3, processes, &data_len, NULL, 0);
+ if (res < 0) {
+ free (processes);
+ if (errno != ENOMEM)