diff options
Diffstat (limited to 'erts')
-rw-r--r-- | erts/emulator/sys/common/erl_mmap.h | 2 | ||||
-rw-r--r-- | erts/lib_src/common/erl_printf.c | 5 |
2 files changed, 6 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) { diff --git a/erts/lib_src/common/erl_printf.c b/erts/lib_src/common/erl_printf.c index 259ba8c81d..86f5da1c40 100644 --- a/erts/lib_src/common/erl_printf.c +++ b/erts/lib_src/common/erl_printf.c @@ -27,6 +27,11 @@ #include "config.h" #endif +#if defined(__sun) || defined(__sun__) + /* For flockfile(3c), putc_unlocked(3c), etc */ + #define __EXTENSIONS__ +#endif + #include <string.h> #include "erl_errno.h" #ifdef __WIN32__ |