diff options
author | Mike Pall <mike> | 2012-03-15 12:01:13 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2012-03-15 12:01:13 +0100 |
commit | 5dbb6671a3b1041108616d59169b868f0a7c8646 (patch) | |
tree | c1b5a5e2ff0c87d12adf571c19afa368b413c436 /src | |
parent | 6670a13bbf6359702aaee7319f64109cc2fe1c65 (diff) | |
download | luajit-5dbb6671a3b1041108616d59169b868f0a7c8646.tar.gz luajit-5dbb6671a3b1041108616d59169b868f0a7c8646.tar.bz2 luajit-5dbb6671a3b1041108616d59169b868f0a7c8646.zip |
Fix compilation on OpenBSD.
Thanks to Laurence Tratt.
Diffstat (limited to 'src')
-rw-r--r-- | src/lj_alloc.c | 4 | ||||
-rw-r--r-- | src/lj_err.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/lj_alloc.c b/src/lj_alloc.c index c1aac00d..e4ce7634 100644 --- a/src/lj_alloc.c +++ b/src/lj_alloc.c | |||
@@ -188,14 +188,14 @@ static LJ_AINLINE void *CALL_MMAP(size_t size) | |||
188 | return ptr; | 188 | return ptr; |
189 | } | 189 | } |
190 | 190 | ||
191 | #elif LJ_TARGET_OSX || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) | 191 | #elif LJ_TARGET_OSX || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) |
192 | 192 | ||
193 | /* OSX and FreeBSD mmap() use a naive first-fit linear search. | 193 | /* OSX and FreeBSD mmap() use a naive first-fit linear search. |
194 | ** That's perfect for us. Except that -pagezero_size must be set for OSX, | 194 | ** That's perfect for us. Except that -pagezero_size must be set for OSX, |
195 | ** otherwise the lower 4GB are blocked. And the 32GB RLIMIT_DATA needs | 195 | ** otherwise the lower 4GB are blocked. And the 32GB RLIMIT_DATA needs |
196 | ** to be reduced to 250MB on FreeBSD. | 196 | ** to be reduced to 250MB on FreeBSD. |
197 | */ | 197 | */ |
198 | #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) | 198 | #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) |
199 | #include <sys/resource.h> | 199 | #include <sys/resource.h> |
200 | #define MMAP_REGION_START ((uintptr_t)0x10000000) | 200 | #define MMAP_REGION_START ((uintptr_t)0x10000000) |
201 | #else | 201 | #else |
diff --git a/src/lj_err.c b/src/lj_err.c index c1e8c561..a4c74780 100644 --- a/src/lj_err.c +++ b/src/lj_err.c | |||
@@ -264,7 +264,7 @@ LJ_FUNCA int lj_err_unwind_dwarf(int version, _Unwind_Action actions, | |||
264 | } | 264 | } |
265 | 265 | ||
266 | #if LJ_UNWIND_EXT | 266 | #if LJ_UNWIND_EXT |
267 | #if LJ_TARGET_OSX | 267 | #if LJ_TARGET_OSX || defined(__OpenBSD__) |
268 | /* Sorry, no thread safety for OSX. Complain to Apple, not me. */ | 268 | /* Sorry, no thread safety for OSX. Complain to Apple, not me. */ |
269 | static struct _Unwind_Exception static_uex; | 269 | static struct _Unwind_Exception static_uex; |
270 | #else | 270 | #else |