Skip to content

Commit

Permalink
Merge pull request #15 from krytarowski/netbsd-1
Browse files Browse the repository at this point in the history
Fix build on NetBSD
  • Loading branch information
daanx committed Jun 23, 2019
2 parents 52ba2d6 + b0b1b43 commit 06f8da4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/os.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ void* _mi_os_alloc_aligned(size_t size, size_t alignment, mi_os_tld_t* tld)
// on BSD, use the aligned mmap api
size_t n = _mi_bsr(alignment);
if ((size_t)1 << n == alignment && n >= 12) { // alignment is a power of 2 and >= 4096
p = mi_mmap(suggest, size, MAP_ALIGNED(n)); // use the freeBSD aligned flags
p = mi_mmap(suggest, size, MAP_ALIGNED(n), tld->stats); // use the NetBSD/freeBSD aligned flags
}
#endif
if (p==NULL && (tld->mmap_next_probable % alignment) == 0) {
Expand Down

0 comments on commit 06f8da4

Please sign in to comment.