pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

mono-git: Add patch-mono_metadata_mono-perfcounters.c and patch-support_sys-mman.c



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Tue Aug 9 01:18:51 2016 +0200
Changeset:	71159d8613a1aafe627c25e574adf64d03aadd5d

Modified Files:
	mono-git/distinfo
Added Files:
	mono-git/patches/patch-mono_metadata_mono-perfcounters.c
	mono-git/patches/patch-support_sys-mman.c

Log Message:
mono-git: Add patch-mono_metadata_mono-perfcounters.c and patch-support_sys-mman.c

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=71159d8613a1aafe627c25e574adf64d03aadd5d

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 mono-git/distinfo                                  |  2 +
 .../patch-mono_metadata_mono-perfcounters.c        | 65 ++++++++++++++++++++++
 mono-git/patches/patch-support_sys-mman.c          | 16 ++++++
 3 files changed, 83 insertions(+)

diffs:
diff --git a/mono-git/distinfo b/mono-git/distinfo
index bf42edd..75e039c 100644
--- a/mono-git/distinfo
+++ b/mono-git/distinfo
@@ -6,5 +6,7 @@ SHA512 (mono-4.4.0.122.tar.bz2) = 264b3779fc94e40c44f8cc637169d7f3a6367ead75b932
 Size (mono-4.4.0.122.tar.bz2) = 84904723 bytes
 SHA1 (patch-eglib_src_giconv.c) = b56e6d328f614d7f70e156a2458b11b36b439f28
 SHA1 (patch-mono_io-layer_io.c) = 5acc0d4fdecc36e7aab5db9d0ca38d415923a996
+SHA1 (patch-mono_metadata_mono-perfcounters.c) = 8b5b6fb08333e3f2993e24e6799227daf8d5c903
 SHA1 (patch-mono_utils_mono-logger.c) = 280e1bf49b79adf57823723287dbc88639d13551
 SHA1 (patch-mono_utils_mono-proclib.c) = da14c51074c2d5096699834cc29b1a222177070e
+SHA1 (patch-support_sys-mman.c) = 85d96f7c540918c0190cd3595d587e159624136d
diff --git a/mono-git/patches/patch-mono_metadata_mono-perfcounters.c b/mono-git/patches/patch-mono_metadata_mono-perfcounters.c
new file mode 100644
index 0000000..8c82763
--- /dev/null
+++ b/mono-git/patches/patch-mono_metadata_mono-perfcounters.c
@@ -0,0 +1,65 @@
+$NetBSD$
+
+--- mono/metadata/mono-perfcounters.c.orig	2016-08-08 17:23:32.000000000 +0000
++++ mono/metadata/mono-perfcounters.c
+@@ -30,9 +30,12 @@
+ #include <mach/message.h>
+ #include <mach/mach_host.h>
+ #include <mach/host_info.h>
++#include <sys/sysctl.h>
+ #endif
+-#if defined (__NetBSD__) || defined (__APPLE__)
++#if defined (__NetBSD__)
++#include <sys/param.h>
+ #include <sys/sysctl.h>
++#include <sys/vmmeter.h>
+ #endif
+ #include "metadata/mono-perfcounters.h"
+ #include "metadata/appdomain.h"
+@@ -425,7 +428,7 @@ mono_determine_physical_ram_size (void)
+ 	int mib[2] = {
+ 		CTL_HW,
+ #ifdef __NetBSD__
+-		HW_PHYSMEM
++		HW_PHYSMEM64
+ #else
+ 		HW_MEMSIZE
+ #endif
+@@ -474,29 +477,22 @@ mono_determine_physical_ram_available_si
+ #elif defined (__NetBSD__)
+ 	struct vmtotal vm_total;
+ 	guint64 page_size;
+-	int mib [2];
++	int mib[2];
+ 	size_t len;
+ 
++	mib[0] = CTL_VM;
++	mib[1] = VM_METER;
+ 
+-	mib = {
+-		CTL_VM,
+-#if defined (VM_METER)
+-		VM_METER
+-#else
+-		VM_TOTAL
+-#endif
+-	};
+ 	len = sizeof (vm_total);
+ 	sysctl (mib, 2, &vm_total, &len, NULL, 0);
+ 
+-	mib = {
+-		CTL_HW,
+-		HW_PAGESIZE
+-	};
++	mib[0] = CTL_HW;
++	mib[1] = HW_PAGESIZE;
++
+ 	len = sizeof (page_size);
+-	sysctl (mib, 2, &page_size, &len, NULL, 0
++	sysctl (mib, 2, &page_size, &len, NULL, 0);
+ 
+-	return ((guint64) value.t_free * page_size) / 1024;
++	return ((guint64) vm_total.t_free * page_size) / 1024;
+ #elif defined (__APPLE__)
+ 	mach_msg_type_number_t count = HOST_VM_INFO_COUNT;
+ 	mach_port_t host = mach_host_self();
diff --git a/mono-git/patches/patch-support_sys-mman.c b/mono-git/patches/patch-support_sys-mman.c
new file mode 100644
index 0000000..44d47eb
--- /dev/null
+++ b/mono-git/patches/patch-support_sys-mman.c
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- support/sys-mman.c.orig	2016-08-08 17:23:32.000000000 +0000
++++ support/sys-mman.c
+@@ -22,6 +22,11 @@
+ #define __BSD_VISIBLE 1
+ #endif
+ 
++#ifdef __NetBSD__
++/* For mincore () */
++#define _NETBSD_SOURCE
++#endif
++
+ #include <sys/types.h>
+ #include <sys/mman.h>
+ #include <errno.h>


Home | Main Index | Thread Index | Old Index