diff options
Diffstat (limited to 'cmd/zed')
-rw-r--r-- | cmd/zed/zed.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/cmd/zed/zed.c b/cmd/zed/zed.c index d2fc0e899..c54a59b0a 100644 --- a/cmd/zed/zed.c +++ b/cmd/zed/zed.c @@ -97,10 +97,7 @@ _setup_sig_handlers(void) static void _lock_memory(void) { -#if ! _POSIX_MEMLOCK - zed_log_die("Failed to lock memory pages: mlockall() not supported"); - -#else /* _POSIX_MEMLOCK */ +#if HAVE_MLOCKALL int i = 0; const int max_tries = 10; @@ -114,7 +111,9 @@ _lock_memory(void) } zed_log_die("Failed to lock memory pages: %s", strerror(errno)); -#endif /* _POSIX_MEMLOCK */ +#else /* HAVE_MLOCKALL */ + zed_log_die("Failed to lock memory pages: mlockall() not supported"); +#endif /* HAVE_MLOCKALL */ } /* |