summaryrefslogtreecommitdiff
path: root/net/libupnp/patches/patch-aa
blob: d9cc527129b9416beea0ff6a8262e84086874e6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
$NetBSD: patch-aa,v 1.6 2008/01/03 12:32:34 obache Exp $

--- threadutil/src/ThreadPool.c.orig	2007-12-25 17:32:22.000000000 +0000
+++ threadutil/src/ThreadPool.c
@@ -234,7 +234,7 @@ static int SetPolicyType( PolicyType in 
 	return 0;
 #elif defined(WIN32)
 	return sched_setscheduler( 0, in );
-#elif defined(_POSIX_PRIORITY_SCHEDULING) && _POSIX_PRIORITY_SCHEDULING > 0
+#elif defined(_POSIX_PRIORITY_SCHEDULING) && _POSIX_PRIORITY_SCHEDULING >= 200112L
 	struct sched_param current;
 
 	sched_getparam( 0, &current );
@@ -261,7 +261,7 @@ static int SetPolicyType( PolicyType in 
  *****************************************************************************/
 static int SetPriority( ThreadPriority priority )
 {
-#if defined(_POSIX_PRIORITY_SCHEDULING) && _POSIX_PRIORITY_SCHEDULING > 0
+#if defined(_POSIX_PRIORITY_SCHEDULING) && _POSIX_PRIORITY_SCHEDULING >= 200112L
 	int currentPolicy;
 	int minPriority = 0;
 	int maxPriority = 0;
@@ -389,7 +389,7 @@ static void SetSeed()
 	gettimeofday(&t, NULL);
 #if defined(WIN32)
  	srand( ( unsigned int )t.tv_usec + (unsigned int)ithread_get_current_thread_id().p );
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__NetBSD__)
  	srand( ( unsigned int )t.tv_usec + (unsigned int)ithread_get_current_thread_id() );
 #elif defined(__linux__)
  	srand( ( unsigned int )t.tv_usec + ithread_get_current_thread_id() );