head 1.3; access; symbols pkgsrc-2013Q2:1.3.0.8 pkgsrc-2013Q2-base:1.3 pkgsrc-2012Q4:1.3.0.6 pkgsrc-2012Q4-base:1.3 pkgsrc-2011Q4:1.3.0.4 pkgsrc-2011Q4-base:1.3 pkgsrc-2011Q2:1.3.0.2 pkgsrc-2011Q2-base:1.3 pkgsrc-2009Q4:1.2.0.2 pkgsrc-2009Q4-base:1.2 pkgsrc-2009Q3:1.1.0.6 pkgsrc-2009Q3-base:1.1 pkgsrc-2009Q2:1.1.0.4 pkgsrc-2009Q2-base:1.1 pkgsrc-2009Q1:1.1.0.2 pkgsrc-2009Q1-base:1.1; locks; strict; comment @# @; 1.3 date 2010.02.01.15.05.58; author jmcneill; state dead; branches; next 1.2; 1.2 date 2009.12.27.15.06.28; author abs; state Exp; branches; next 1.1; 1.1 date 2009.02.05.21.05.07; author tron; state Exp; branches; next ; desc @@ 1.3 log @gc old patches, no longer necessary for pa 0.9.21 @ text @$NetBSD: patch-al,v 1.2 2009/12/27 15:06:28 abs Exp $ --- src/pulsecore/core-util.c.orig 2009-12-27 14:25:19.000000000 +0000 +++ src/pulsecore/core-util.c @@@@ -105,6 +105,10 @@@@ #define MSG_NOSIGNAL 0 #endif +#ifdef __APPLE__ +#include +#endif + #ifdef OS_IS_WIN32 #define PULSE_ROOTENV "PULSE_ROOT" @@@@ -687,11 +691,19 @@@@ int pa_raise_priority(int nice_level) { void pa_reset_priority(void) { #ifdef HAVE_SYS_RESOURCE_H struct sched_param sp; + int policy; setpriority(PRIO_PROCESS, 0, 0); memset(&sp, 0, sizeof(sp)); - pa_assert_se(pthread_setschedparam(pthread_self(), SCHED_OTHER, &sp) == 0); + pa_assert_se(pthread_getschedparam(pthread_self(), &policy, &sp) == 0); + /* + * Set back to standard priority iff we previously set high_priority + * Avoid assert on at least NetBSD 5 in !high_priority case + */ + if (policy != SCHED_OTHER) + pa_assert_se(pthread_setschedparam(pthread_self(), SCHED_OTHER, &sp) + == 0); #endif #ifdef OS_IS_WIN32 @ 1.2 log @Avoid an assert on pthread_setschedparam() if the priority was already SCHED_OTHER - bump pkgrevision @ text @d1 1 a1 1 $NetBSD: patch-al,v 1.1 2009/02/05 21:05:07 tron Exp $ @ 1.1 log @Make this package build and work under Mac OS X (Leopard). This fixes PR pkg/40424 by Torsten Harenberg. @ text @d1 1 a1 1 $NetBSD$ d3 2 a4 2 --- src/pulsecore/core-util.c.orig 2009-02-05 14:21:35.000000000 +0000 +++ src/pulsecore/core-util.c 2009-02-05 14:42:02.000000000 +0000 d16 21 @