pkgsrc - initial commit
[pkgsrc.git] / audio / fluidsynth / patches / patch-ab
1 $NetBSD: patch-ab,v 1.2 2007/12/16 15:18:29 adam Exp $
2
3 --- src/fluid_sys.c.orig        2007-11-11 20:47:30.000000000 +0100
4 +++ src/fluid_sys.c
5 @@ -709,8 +709,10 @@ new_fluid_timer(int msec, fluid_timer_ca
6  {
7    pthread_attr_t *attr = NULL;
8    pthread_attr_t rt_attr;
9 +#if !defined(__NetBSD__)
10    int sched = SCHED_FIFO;
11    struct sched_param priority;
12 +#endif
13    int err;
14  
15    fluid_timer_t* timer = FLUID_NEW(fluid_timer_t);
16 @@ -726,6 +728,7 @@ new_fluid_timer(int msec, fluid_timer_ca
17    timer->auto_destroy = auto_destroy;
18  
19    err = pthread_attr_init(&rt_attr);
20 +#if !defined(__NetBSD__)
21    if (err == 0) {
22           err = pthread_attr_setschedpolicy(&rt_attr, SCHED_FIFO);
23           if (err == 0) {
24 @@ -736,6 +739,7 @@ new_fluid_timer(int msec, fluid_timer_ca
25                   }
26           }
27    }
28 +#endif
29  
30    if (new_thread) {
31           err = pthread_create(&timer->thread, attr, fluid_timer_start, (void*) timer);