summaryrefslogtreecommitdiff
path: root/net/libupnp/patches/patch-aa
blob: 22b3b11709d50eb317a9832b8a7bf8bc0941a949 (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.9 2008/05/13 11:20:02 obache Exp $

--- threadutil/src/ThreadPool.c.orig	2008-04-10 16:03:04.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__) || defined(__OSX__) || defined(__APPLE__)
+#elif defined(__FreeBSD__) || defined(__OSX__) || defined(__APPLE__) || defined(__NetBSD__) || defined(__DragonFly__)
  	srand( ( unsigned int )t.tv_usec + (unsigned int)ithread_get_current_thread_id() );
 #elif defined(__linux__) || defined(__sun)
  	srand( ( unsigned int )t.tv_usec + ithread_get_current_thread_id() );