3 Fix building on SunOS in C99 mode.
5 --- a/src/hotspot/os/solaris/os_solaris.cpp.orig 2019-01-08 09:40:30.000000000 +0000
6 +++ b/src/hotspot/os/solaris/os_solaris.cpp
7 @@ -169,6 +169,8 @@ extern "C" {
9 static int lwp_cond_init(cond_t *cv, int scope, void *arg){ memset(cv, 0, sizeof(cond_t)); return 0; }
10 static int lwp_cond_destroy(cond_t *cv) { return 0; }
11 + int memcntl(void *, size_t, int, void *, int, int);
12 + int meminfo(const uint64_t *, int, const uint_t *, int, uint64_t *, uint_t *);
15 // "default" initializers for pthread-based synchronization
16 @@ -2325,7 +2327,7 @@ void os::pd_commit_memory_or_exit(char*
18 // Uncommit the pages in a specified region.
19 void os::pd_free_memory(char* addr, size_t bytes, size_t alignment_hint) {
20 - if (madvise(addr, bytes, MADV_FREE) < 0) {
21 + if (posix_madvise(addr, bytes, MADV_FREE) < 0) {
22 debug_only(warning("MADV_FREE failed."));
25 @@ -2354,7 +2356,7 @@ void os::pd_realign_memory(char *addr, s
26 // Tell the OS to make the range local to the first-touching LWP
27 void os::numa_make_local(char *addr, size_t bytes, int lgrp_hint) {
28 assert((intptr_t)addr % os::vm_page_size() == 0, "Address should be page-aligned.");
29 - if (madvise(addr, bytes, MADV_ACCESS_LWP) < 0) {
30 + if (posix_madvise(addr, bytes, MADV_ACCESS_LWP) < 0) {
31 debug_only(warning("MADV_ACCESS_LWP failed."));
34 @@ -2362,7 +2364,7 @@ void os::numa_make_local(char *addr, siz
35 // Tell the OS that this range would be accessed from different LWPs.
36 void os::numa_make_global(char *addr, size_t bytes) {
37 assert((intptr_t)addr % os::vm_page_size() == 0, "Address should be page-aligned.");
38 - if (madvise(addr, bytes, MADV_ACCESS_MANY) < 0) {
39 + if (posix_madvise(addr, bytes, MADV_ACCESS_MANY) < 0) {
40 debug_only(warning("MADV_ACCESS_MANY failed."));