mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-25 08:37:13 +09:00
Merge pull request #399 from blacklion/patch-1
Support madvise() on FreeBSD
This commit is contained in:
@@ -50,6 +50,13 @@
|
||||
#if defined(HAVE_ALIGNED_MALLOC) && (defined(WINAPI_DESKTOP) || defined(HAVE_MPROTECT))
|
||||
# define HAVE_PAGE_PROTECTION
|
||||
#endif
|
||||
/* FreeBSD defines these with its own names */
|
||||
if !defined(MADV_DONTDUMP) && defined(HAVE_MADVISE)
|
||||
# define MADV_DONTDUMP MADV_NOCORE
|
||||
#endif
|
||||
if !defined(MADV_DODUMP) && defined(HAVE_MADVISE)
|
||||
# define MADV_DODUMP MADV_CORE
|
||||
#endif
|
||||
|
||||
static size_t page_size;
|
||||
static unsigned char canary[CANARY_SIZE];
|
||||
|
||||
Reference in New Issue
Block a user