2013-09-26 17:14:40 +02:00

48 lines
1.3 KiB
Plaintext

$NetBSD: patch-ag,v 1.2 2006/04/09 16:08:06 rillig Exp $
NetBSD-1.6.2 does not have struct sched_param.
--- src/portaudio/pa_unix.c.orig Sun Jul 11 18:03:57 2004
+++ src/portaudio/pa_unix.c Wed Mar 16 02:58:17 2005
@@ -87,6 +87,8 @@ O- what if input and output of a device
*/
+#include <pkgsrc_fixes.h>
+
#include "pa_unix.h"
typedef void *(*pthread_function_t)(void *);
@@ -411,6 +413,7 @@ static int PaHost_CanaryProc( PaHostSoun
static PaError PaHost_WatchDogProc( PaHostSoundControl *pahsc )
{
+#ifdef HAVE_STRUCT_SCHED_PARAM
struct sched_param schp = { 0 };
int maxPri;
@@ -495,6 +498,7 @@ cleanup:
#ifdef GNUSTEP
GSUnregisterCurrentThread(); /* SB20010904 */
#endif
+#endif
return 0;
}
@@ -574,6 +578,7 @@ static PaError PaHost_BoostPriority( int
{
PaHostSoundControl *pahsc;
PaError result = paNoError;
+#ifdef HAVE_STRUCT_SCHED_PARAM
struct sched_param schp = { 0 };
pahsc = (PaHostSoundControl *) past->past_DeviceData;
@@ -597,6 +602,7 @@ static PaError PaHost_BoostPriority( int
/* We are running at high priority so we should have a watchdog in case audio goes wild. */
result = PaHost_StartWatchDog( pahsc );
}
+#endif
return result;
}