svn commit: r322726 - in head/emulators/virtualbox-ose: . files
Bernhard Froehlich
decke at FreeBSD.org
Wed Jul 10 17:57:08 UTC 2013
Author: decke
Date: Wed Jul 10 17:57:07 2013
New Revision: 322726
URL: http://svnweb.freebsd.org/changeset/ports/322726
Log:
- Fix querying total and available RAM on i386
Submitted by: Cy Schubert <cy at FreeBSD.org>
Modified:
head/emulators/virtualbox-ose/Makefile
head/emulators/virtualbox-ose/files/patch-src-VBox-Runtime-r3-freebsd-RTSystemQueryTotalRam-freebsd.cpp
Modified: head/emulators/virtualbox-ose/Makefile
==============================================================================
--- head/emulators/virtualbox-ose/Makefile Wed Jul 10 17:57:00 2013 (r322725)
+++ head/emulators/virtualbox-ose/Makefile Wed Jul 10 17:57:07 2013 (r322726)
@@ -3,6 +3,7 @@
PORTNAME= virtualbox-ose
DISTVERSION= 4.2.16
+PORTREVISION= 1
CATEGORIES= emulators
MASTER_SITES= http://download.virtualbox.org/virtualbox/${DISTVERSION}/ \
http://tmp.chruetertee.ch/ \
Modified: head/emulators/virtualbox-ose/files/patch-src-VBox-Runtime-r3-freebsd-RTSystemQueryTotalRam-freebsd.cpp
==============================================================================
--- head/emulators/virtualbox-ose/files/patch-src-VBox-Runtime-r3-freebsd-RTSystemQueryTotalRam-freebsd.cpp Wed Jul 10 17:57:00 2013 (r322725)
+++ head/emulators/virtualbox-ose/files/patch-src-VBox-Runtime-r3-freebsd-RTSystemQueryTotalRam-freebsd.cpp Wed Jul 10 17:57:07 2013 (r322726)
@@ -55,7 +55,7 @@
+ includes non-main memory as well */
+ *pcb = 0;
+ if (sysctl(mib, 2, pcb, &pcblen, NULL, 0) == 0) {
-+ if (pcblen == sizeof(*pcb))
++ if (pcblen == sizeof(*pcb) || pcblen == sizeof(uint32_t))
+ return VINF_SUCCESS;
+ else
+ return VERR_NO_MEMORY; /* XXX */
@@ -74,7 +74,7 @@
+ mib[1] = HW_USERMEM;
+ *pcb = 0;
+ if (sysctl(mib, 2, pcb, &pcblen, NULL, 0) == 0) {
-+ if (pcblen == sizeof(*pcb))
++ if (pcblen == sizeof(*pcb) || pcblen == sizeof(uint32_t))
+ return VINF_SUCCESS;
+ else
+ return VERR_NO_MEMORY; /* XXX */
More information about the svn-ports-all
mailing list