From 702e15e02335d4d15e8faddd45c9e9746e4d81a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20H=C3=B6gberg?= Date: Thu, 28 Feb 2019 09:32:19 +0100 Subject: erts: Stop using madvise(2) on Solaris inet_drv adds some arcane #defines to get SCTP working, which may end up disabling madvise(2) locally in that file, breaking the build in the process. This commit disables madvise(2) altogether on Solaris as it's far simpler than undoing the define dance in erl_mmap.h. --- erts/emulator/sys/common/erl_mmap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/emulator/sys/common/erl_mmap.h') diff --git a/erts/emulator/sys/common/erl_mmap.h b/erts/emulator/sys/common/erl_mmap.h index e1ff0fe80a..3085bf7e19 100644 --- a/erts/emulator/sys/common/erl_mmap.h +++ b/erts/emulator/sys/common/erl_mmap.h @@ -203,7 +203,7 @@ ERTS_GLB_INLINE void erts_mem_discard(void *p, UWord size); data[i] = pattern[i % sizeof(pattern)]; } } -#elif defined(HAVE_SYS_MMAN_H) +#elif defined(HAVE_SYS_MMAN_H) && !(defined(__sun) || defined(__sun__)) #include ERTS_GLB_INLINE void erts_mem_discard(void *ptr, UWord size) { -- cgit v1.2.3