Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Nov 2002 22:27:56 +0100 (CET)
From:      Volker Stolz <vs@foldr.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/44951: [patch] audio/rawrec: fix mlockall usage on -current
Message-ID:  <200211052127.gA5LRueb072997@monster.ikea.net>

next in thread | raw e-mail | index | archive | help

>Number:         44951
>Category:       ports
>Synopsis:       [patch] audio/rawrec: fix mlockall usage on -current
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 05 13:30:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Volker Stolz
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD monster.ikea.net 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Sat Oct 26 17:47:39 CEST 2002 root@monster.ikea.net:/usr/obj/usr/src/sys/MONSTER i386


>Description:
mlockall is not present on -current, but _POSIX_MEMLOCK detection is borked.
>How-To-Repeat:
>Fix:
Two patches which test for "1" instead of a simple #ifdef.

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	files
#	files/patch-src-play.c
#	files/patch-src-record.c
#
echo c - files
mkdir -p files > /dev/null 2>&1
echo x - files/patch-src-play.c
sed 's/^X//' >files/patch-src-play.c << 'END-of-files/patch-src-play.c'
X--- play.c.orig	Tue Nov  5 22:11:11 2002
X+++ play.c	Tue Nov  5 22:11:38 2002
X@@ -400,7 +400,7 @@
X     }
X 
X     /* Entering critical section.  Lock down our memory, if possible.  */
X-#ifdef _POSIX_MEMLOCK
X+#if _POSIX_MEMLOCK == 1
X     if ( mlockall(MCL_CURRENT) == -1 ) {
X       fprintf(stderr, "%s: mlockall(MCL_CURRENT) failed: ", progname);
X       perror("");
END-of-files/patch-src-play.c
echo x - files/patch-src-record.c
sed 's/^X//' >files/patch-src-record.c << 'END-of-files/patch-src-record.c'
X--- record.c.orig	Tue Nov  5 22:11:18 2002
X+++ record.c	Tue Nov  5 22:11:55 2002
X@@ -317,7 +317,7 @@
X     }
X 
X     /* Entering critical section.  Lock down our memory, if possible.  */
X-#ifdef _POSIX_MEMLOCK
X+#if _POSIX_MEMLOCK == 1
X     if ( mlockall(MCL_CURRENT) == -1 ) {
X       fprintf(stderr, "%s: mlockall(MCL_CURRENT) failed: ", progname);
X       perror("");
END-of-files/patch-src-record.c
exit


>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200211052127.gA5LRueb072997>