aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorJohn Högberg <[email protected]>2019-02-28 09:32:19 +0100
committerJohn Högberg <[email protected]>2019-02-28 10:27:45 +0100
commit702e15e02335d4d15e8faddd45c9e9746e4d81a4 (patch)
treecd72973d176ab875fedd21dee1654a4a95ed171d /erts
parent236436e82f97652c8375d51f8eded9bd4a3201f4 (diff)
downloadotp-702e15e02335d4d15e8faddd45c9e9746e4d81a4.tar.gz
otp-702e15e02335d4d15e8faddd45c9e9746e4d81a4.tar.bz2
otp-702e15e02335d4d15e8faddd45c9e9746e4d81a4.zip
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.
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/sys/common/erl_mmap.h2
1 files changed, 1 insertions, 1 deletions
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 <sys/mman.h>
ERTS_GLB_INLINE void erts_mem_discard(void *ptr, UWord size) {