aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2013-10-16 02:12:05 +0800
committerjkim <jkim@FreeBSD.org>2013-10-16 02:12:05 +0800
commitf55117a4aaee52cfb05f13ee497d2157e832c3b4 (patch)
tree6f3e7583db1d08f5adad07a1b8aa9add06472c3b /java
parent99cdd1fed3e9d1af3a247ab9a52d17e178a40b05 (diff)
downloadfreebsd-ports-graphics-f55117a4aaee52cfb05f13ee497d2157e832c3b4.tar.gz
freebsd-ports-graphics-f55117a4aaee52cfb05f13ee497d2157e832c3b4.tar.zst
freebsd-ports-graphics-f55117a4aaee52cfb05f13ee497d2157e832c3b4.zip
Fix build on old releases where nitems() macro is not defined.
Reported by: Scott Ballantyne (sdb at ssr dot com)
Diffstat (limited to 'java')
-rw-r--r--java/openjdk6/files/patch-set4
1 files changed, 2 insertions, 2 deletions
diff --git a/java/openjdk6/files/patch-set b/java/openjdk6/files/patch-set
index b9905915252..ea70b16ab96 100644
--- a/java/openjdk6/files/patch-set
+++ b/java/openjdk6/files/patch-set
@@ -676,7 +676,7 @@
+ julong free_pages;
+ u_int i, npages;
+
-+ for (i = 0, free_pages = 0; i < nitems(vm_stats); i++) {
++ for (i = 0, free_pages = 0; i < sizeof(vm_stats) / sizeof(vm_stats[0]); i++) {
+ size = sizeof(npages);
+ if (sysctlbyname(vm_stats[i], &npages, &size, NULL, 0) == -1) {
+ free_pages = 0;
@@ -816,7 +816,7 @@
+ size_t mibsize, size;
+ int mib[16], n, total = 0, used = 0;
+
-+ mibsize = nitems(mib);
++ mibsize = sizeof(mib) / sizeof(mib[0]);
+ if (sysctlnametomib("vm.swap_info", mib, &mibsize) != -1) {
+ for (n = 0; ; n++) {
+ mib[mibsize] = n;