Like the previous ones, we now have sched_get_priority_{min|max}...

This one was also having trouble with functions checking.

OK?

Cheers, 
David

Index: Makefile
===================================================================
RCS file: /cvs/ports/multimedia/mediatomb/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- Makefile    18 Oct 2010 21:25:07 -0000      1.2
+++ Makefile    9 Nov 2010 13:03:40 -0000
@@ -4,6 +4,7 @@ COMMENT =       UPnP media server
 
 VER =          0.12.1
 DISTNAME =     mediatomb-${VER}
+REVISION =     0
 
 CATEGORIES =   multimedia
 
@@ -36,7 +37,7 @@ CONFIGURE_ARGS +=     --disable-inotify \
                        --disable-mysql \
                        PTHREAD_LIBS="-pthread"
 CONFIGURE_ENV =                CPPFLAGS="-I${LOCALBASE}/include" \
-                       LDFLAGS="-L${LOCALBASE}/lib"
+                       LDFLAGS="-L${LOCALBASE}/lib -pthread"
 AUTOCONF_VERSION =     2.63
 USE_GROFF =    Yes
 
Index: patches/patch-configure_ac
===================================================================
RCS file: /cvs/ports/multimedia/mediatomb/patches/patch-configure_ac,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-configure_ac
--- patches/patch-configure_ac  21 Sep 2010 13:28:31 -0000      1.1.1.1
+++ patches/patch-configure_ac  9 Nov 2010 13:03:40 -0000
@@ -1,6 +1,15 @@
 $OpenBSD: patch-configure_ac,v 1.1.1.1 2010/09/21 13:28:31 edd Exp $
---- configure.ac.orig  Thu Mar 25 15:47:02 2010
-+++ configure.ac       Mon Apr  5 17:00:31 2010
+--- configure.ac.orig  Thu Apr  8 00:38:51 2010
++++ configure.ac       Tue Nov  9 13:36:36 2010
+@@ -342,7 +342,7 @@ AC_CHECK_HEADERS([langinfo.h locale.h],[],[AC_MSG_WARN
+ AC_CHECK_HEADERS([sys/utsname.h])
+ 
+ AC_CHECK_HEADERS([sched.h ctype.h],[],[])
+-AC_CHECK_FUNCS([sched_getparam sched_setparam sched_get_priority_min 
sched_get_priority_max],[],[])
++AC_CHECK_FUNCS([pthread_attr_getschedparam pthread_attr_setschedparam 
sched_get_priority_min sched_get_priority_max],[],[])
+    
+ AC_CHECK_FUNCS([mkdir], [],
+               [AC_MSG_ERROR(required function not found)])
 @@ -692,6 +692,8 @@ if test $DARWIN_OS -eq 1 ; then
          AC_MSG_NOTICE([You are running OSX, assuming threadsafe gethostbyname 
version])
  elif test $CYGWIN_OS -eq 1; then
Index: patches/patch-tombupnp_threadutil_src_ThreadPool_c
===================================================================
RCS file: 
/cvs/ports/multimedia/mediatomb/patches/patch-tombupnp_threadutil_src_ThreadPool_c,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-tombupnp_threadutil_src_ThreadPool_c
--- patches/patch-tombupnp_threadutil_src_ThreadPool_c  21 Sep 2010 13:28:31 
-0000      1.1.1.1
+++ patches/patch-tombupnp_threadutil_src_ThreadPool_c  9 Nov 2010 13:03:40 
-0000
@@ -1,30 +1,7 @@
 $OpenBSD: patch-tombupnp_threadutil_src_ThreadPool_c,v 1.1.1.1 2010/09/21 
13:28:31 edd Exp $
 --- tombupnp/threadutil/src/ThreadPool.c.orig  Thu Mar 25 15:58:13 2010
-+++ tombupnp/threadutil/src/ThreadPool.c       Tue Aug 24 15:35:28 2010
-@@ -141,7 +141,7 @@ SetPolicyType( PolicyType in )
- static int
- SetPriority( ThreadPriority priority )
- {
--#if defined(HAVE_SCHED_GET_PRIORITY_MIN) && 
defined(HAVE_SCHED_GET_PRIORITY_MAX)
-+#if (defined(HAVE_SCHED_GET_PRIORITY_MIN) && 
defined(HAVE_SCHED_GET_PRIORITY_MAX)) || defined(__OpenBSD__)
-     int currentPolicy;
-     int minPriority = 0;
-     int maxPriority = 0;
-@@ -152,8 +152,13 @@ SetPriority( ThreadPriority priority )
-     pthread_getschedparam( ithread_self(  ), &currentPolicy,
-                            &newPriority );
- 
-+#if !defined(__OpenBSD__)
-     minPriority = sched_get_priority_min( currentPolicy );
-     maxPriority = sched_get_priority_max( currentPolicy );
-+#else
-+    minPriority = 0;
-+    maxPriority = 31;
-+#endif
-     midPriority = ( maxPriority - minPriority ) / 2;
-     switch ( priority ) {
- 
-@@ -372,8 +377,10 @@ tp->stats.totalJobsLQ++; tp->stats.totalTimeLQ += diff
++++ tombupnp/threadutil/src/ThreadPool.c       Tue Nov  9 13:03:02 2010
+@@ -372,8 +372,10 @@ tp->stats.totalJobsLQ++; tp->stats.totalTimeLQ += diff
      gettimeofday( &t, NULL );
  #if defined(WIN32)
      srand( ( unsigned int )(t.tv_usec/1000) + (unsigned 
int)ithread_get_current_thread_id(  ).p );

Reply via email to