rebuild geeqie
[oi-userland.git] / components / runtime / openjdk-8 / patches / 0052-patch-jdk_src_solaris_bin_ergo.c.patch
blob4c54663b5aa7b9659336e94dd15a600122d4db35
1 $NetBSD: patch-jdk_src_solaris_bin_ergo.c,v 1.1 2015/02/08 08:41:25 tnn Exp $
3 No _SC_PHYS_PAGES on NetBSD < 6.
4 we could use the hw.physmem64 sysctl instead of returning 0,
5 although I don't think this code is actually used.
7 --- jdk/src/solaris/bin/ergo.c.orig 2015-02-02 15:37:12.000000000 +0000
8 +++ jdk/src/solaris/bin/ergo.c
9 @@ -100,7 +100,11 @@ ServerClassMachineImpl(void) {
10 /* Compute physical memory by asking the OS */
11 uint64_t
12 physical_memory(void) {
13 +#ifdef _SC_PHYS_PAGES
14 const uint64_t pages = (uint64_t) sysconf(_SC_PHYS_PAGES);
15 +#else
16 + const uint64_t pages = 0;
17 +#endif
18 const uint64_t page_size = (uint64_t) sysconf(_SC_PAGESIZE);
19 const uint64_t result = pages * page_size;
20 # define UINT64_FORMAT "%" PRIu64