mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-07-25 09:13:26 +00:00
bsd: Fix mlockall on FreeBSD version >= 8.0
FreeBSD version 8.0 and greater supports mlockall syscall correctly. So configure.ac is changed to detect FreeBSD version and main.c is changed to support it. Resolves: rhbz#513687 git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2560 fd59a12c-fef9-0310-b244-a6a79926bd2f
This commit is contained in:
parent
47b9e296f9
commit
9edbf61401
@ -263,6 +263,14 @@ case "$host_os" in
|
||||
OS_DYFLAGS="-export-dynamic"
|
||||
DARWIN_OPTS=""
|
||||
OS_LDL=""
|
||||
case "$host_os" in
|
||||
*freebsd[[234567]]*)
|
||||
;;
|
||||
*freebsd*)
|
||||
AC_DEFINE_UNQUOTED([COROSYNC_FREEBSD_GE_8], [1],
|
||||
[Compiling for FreeBSD >= 8 platform])
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*solaris*)
|
||||
AC_DEFINE_UNQUOTED([COROSYNC_SOLARIS], [1],
|
||||
|
@ -404,7 +404,7 @@ static void corosync_tty_detach (void)
|
||||
|
||||
static void corosync_mlockall (void)
|
||||
{
|
||||
#if !defined(COROSYNC_BSD)
|
||||
#if !defined(COROSYNC_BSD) || defined(COROSYNC_FREEBSD_GE_8)
|
||||
int res;
|
||||
#endif
|
||||
struct rlimit rlimit;
|
||||
@ -417,8 +417,8 @@ static void corosync_mlockall (void)
|
||||
setrlimit (RLIMIT_VMEM, &rlimit);
|
||||
#endif
|
||||
|
||||
#if defined(COROSYNC_BSD)
|
||||
/* under FreeBSD a process with locked page cannot call dlopen
|
||||
#if defined(COROSYNC_BSD) && !defined(COROSYNC_FREEBSD_GE_8)
|
||||
/* under FreeBSD < 8 a process with locked page cannot call dlopen
|
||||
* code disabled until FreeBSD bug i386/93396 was solved
|
||||
*/
|
||||
log_printf (LOGSYS_LEVEL_WARNING, "Could not lock memory of service to avoid page faults\n");
|
||||
|
Loading…
Reference in New Issue
Block a user