diff options
author | Bernhard Froehlich <decke@FreeBSD.org> | 2013-07-10 17:57:07 +0000 |
---|---|---|
committer | Bernhard Froehlich <decke@FreeBSD.org> | 2013-07-10 17:57:07 +0000 |
commit | 75bd97679a7a4d70efa48a4206cfea10687fdf2a (patch) | |
tree | b2370609c331f0607e49dcc1abd521ca7544c71b | |
parent | - Upstream distfile has been rerolled (diff) |
- Fix querying total and available RAM on i386
Submitted by: Cy Schubert <cy@FreeBSD.org>
Notes
Notes:
svn path=/head/; revision=322726
-rw-r--r-- | emulators/virtualbox-ose/Makefile | 1 | ||||
-rw-r--r-- | emulators/virtualbox-ose/files/patch-src-VBox-Runtime-r3-freebsd-RTSystemQueryTotalRam-freebsd.cpp | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/emulators/virtualbox-ose/Makefile b/emulators/virtualbox-ose/Makefile index 749287545177..b3a9b845f1a4 100644 --- a/emulators/virtualbox-ose/Makefile +++ b/emulators/virtualbox-ose/Makefile @@ -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/ \ diff --git a/emulators/virtualbox-ose/files/patch-src-VBox-Runtime-r3-freebsd-RTSystemQueryTotalRam-freebsd.cpp b/emulators/virtualbox-ose/files/patch-src-VBox-Runtime-r3-freebsd-RTSystemQueryTotalRam-freebsd.cpp index e4aedee6a209..4ecdf4265fa7 100644 --- a/emulators/virtualbox-ose/files/patch-src-VBox-Runtime-r3-freebsd-RTSystemQueryTotalRam-freebsd.cpp +++ b/emulators/virtualbox-ose/files/patch-src-VBox-Runtime-r3-freebsd-RTSystemQueryTotalRam-freebsd.cpp @@ -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 */ |