summaryrefslogtreecommitdiff
path: root/src/lib/eina/eina_mmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/eina/eina_mmap.c')
-rw-r--r--src/lib/eina/eina_mmap.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/lib/eina/eina_mmap.c b/src/lib/eina/eina_mmap.c
index d8fd2e55f8..8b2853e443 100644
--- a/src/lib/eina/eina_mmap.c
+++ b/src/lib/eina/eina_mmap.c
@@ -147,12 +147,8 @@ eina_mmap_safety_enabled_set(Eina_Bool enabled)
147 struct sigaction sa; 147 struct sigaction sa;
148 148
149 /* find out system page size the cleanest way we can */ 149 /* find out system page size the cleanest way we can */
150#ifdef _SC_PAGESIZE 150 _eina_mmap_pagesize = eina_cpu_page_size();
151 _eina_mmap_pagesize = sysconf(_SC_PAGESIZE); 151
152 if (_eina_mmap_pagesize <= 0) return EINA_FALSE;
153#else
154 _eina_mmap_pagesize = 4096;
155#endif
156 /* no zero page device - open it */ 152 /* no zero page device - open it */
157 if (_eina_mmap_zero_fd < 0) 153 if (_eina_mmap_zero_fd < 0)
158 { 154 {
@@ -169,7 +165,6 @@ eina_mmap_safety_enabled_set(Eina_Bool enabled)
169 flags |= FD_CLOEXEC; 165 flags |= FD_CLOEXEC;
170 fcntl(_eina_mmap_zero_fd, F_SETFD, flags); 166 fcntl(_eina_mmap_zero_fd, F_SETFD, flags);
171#endif 167#endif
172
173 } 168 }
174 /* set up signal handler for SIGBUS */ 169 /* set up signal handler for SIGBUS */
175 sa.sa_sigaction = _eina_mmap_safe_sigbus; 170 sa.sa_sigaction = _eina_mmap_safe_sigbus;