diff --git a/audio/umurmur/patches/patch-src_main_c b/audio/umurmur/patches/patch-src_main_c index e5eba4286f7..e9dd069f8c4 100644 --- a/audio/umurmur/patches/patch-src_main_c +++ b/audio/umurmur/patches/patch-src_main_c @@ -1,14 +1,68 @@ -$OpenBSD: patch-src_main_c,v 1.1 2011/10/30 16:05:35 dcoppa Exp $ ---- src/main.c.orig Sun Oct 30 16:38:20 2011 -+++ src/main.c Sun Oct 30 16:39:18 2011 -@@ -235,8 +235,9 @@ int main(int argc, char **argv) +$OpenBSD: patch-src_main_c,v 1.2 2012/03/30 06:09:54 ajacoutot Exp $ +--- src/main.c.orig Tue Oct 11 06:44:58 2011 ++++ src/main.c Sat Mar 24 10:57:15 2012 +@@ -41,7 +41,7 @@ + #include + #include + #include +-#ifdef _POSIX_PRIORITY_SCHEDULING ++#if defined(_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING > 0) + #include + #endif + #include "server.h" +@@ -200,7 +200,7 @@ void daemonize() + + } + +-#ifdef _POSIX_PRIORITY_SCHEDULING ++#if defined(_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING > 0) + void setscheduler() + { + int rc; +@@ -219,7 +219,7 @@ void printhelp() + printf("uMurmur version %s. Mumble protocol %d.%d.%d\n", UMURMUR_VERSION, PROTVER_MAJOR, PROTVER_MINOR, PROTVER_PATCH); + printf("Usage: umurmurd [-d] [-r] [-h] [-p ] [-t] [-c ] [-a ] [-b ]\n"); + printf(" -d - Do not daemonize - run in foreground.\n"); +-#ifdef _POSIX_PRIORITY_SCHEDULING ++#if defined(_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING > 0) + printf(" -r - Run with realtime priority\n"); + #endif + printf(" -p - Write PID to this file\n"); +@@ -234,15 +234,16 @@ void printhelp() + int main(int argc, char **argv) { bool_t nodaemon = false; - #ifdef _POSIX_PRIORITY_SCHEDULING +-#ifdef _POSIX_PRIORITY_SCHEDULING - bool_t realtime = false, testconfig = false; ++#if defined(_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING > 0) + bool_t realtime = false; #endif + bool_t testconfig = false; char *conffile = NULL, *pidfile = NULL; int c; struct utsname utsbuf; + + /* Arguments */ +-#ifdef _POSIX_PRIORITY_SCHEDULING ++#if defined(_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING > 0) + while ((c = getopt(argc, argv, "drp:c:a:b:ht")) != EOF) { + #else + while ((c = getopt(argc, argv, "dp:c:a:b:ht")) != EOF) { +@@ -269,7 +270,7 @@ int main(int argc, char **argv) + case 't': + testconfig = true; + break; +-#ifdef _POSIX_PRIORITY_SCHEDULING ++#if defined(_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING > 0) + case 'r': + realtime = true; + break; +@@ -333,7 +334,7 @@ int main(int argc, char **argv) + Chan_init(); + Client_init(); + +-#ifdef _POSIX_PRIORITY_SCHEDULING ++#if defined(_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING > 0) + if (realtime) + setscheduler(); + #endif diff --git a/devel/commoncpp/patches/patch-src_process_cpp b/devel/commoncpp/patches/patch-src_process_cpp new file mode 100644 index 00000000000..fae726e74f1 --- /dev/null +++ b/devel/commoncpp/patches/patch-src_process_cpp @@ -0,0 +1,30 @@ +$OpenBSD: patch-src_process_cpp,v 1.1 2012/03/30 06:09:54 ajacoutot Exp $ +--- src/process.cpp.orig Fri Jan 16 07:27:00 2009 ++++ src/process.cpp Sat Mar 24 10:15:59 2012 +@@ -526,7 +526,7 @@ void Process::attach(const char *dev) + + void Process::setScheduler(const char *pol) + { +-#ifdef _POSIX_PRIORITY_SCHEDULING ++#if defined(_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING > 0) + struct sched_param p; + int policy; + +@@ -582,7 +582,7 @@ void Process::setScheduler(const char *pol) + + void Process::setPriority(int pri) + { +-#ifdef _POSIX_PRIORITY_SCHEDULING ++#if defined(_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING > 0) + struct sched_param p; + int policy = sched_getscheduler(0); + int min = sched_get_priority_min(policy); +@@ -607,7 +607,7 @@ void Process::setPriority(int pri) + + bool Process::isScheduler(void) + { +-#ifdef _POSIX_PRIORITY_SCHEDULING ++#if defined(_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING > 0) + return true; + #else + return false; diff --git a/multimedia/libdv/patches/patch-encodedv_dvconnect_c b/multimedia/libdv/patches/patch-encodedv_dvconnect_c new file mode 100644 index 00000000000..4e6926862ba --- /dev/null +++ b/multimedia/libdv/patches/patch-encodedv_dvconnect_c @@ -0,0 +1,12 @@ +$OpenBSD: patch-encodedv_dvconnect_c,v 1.3 2012/03/30 06:09:54 ajacoutot Exp $ +--- encodedv/dvconnect.c.orig Sat Mar 24 10:10:08 2012 ++++ encodedv/dvconnect.c Sat Mar 24 10:13:34 2012 +@@ -857,7 +857,7 @@ int send_raw(const char*const* filenames, int channel, + + int rt_raisepri (int pri) + { +-#ifdef _SC_PRIORITY_SCHEDULING ++#if defined(_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING > 0) + struct sched_param scp; + + /* diff --git a/sysutils/heartbeat/patches/patch-lib_clplumbing_realtime_c b/sysutils/heartbeat/patches/patch-lib_clplumbing_realtime_c new file mode 100644 index 00000000000..bfb275cd9df --- /dev/null +++ b/sysutils/heartbeat/patches/patch-lib_clplumbing_realtime_c @@ -0,0 +1,21 @@ +$OpenBSD: patch-lib_clplumbing_realtime_c,v 1.1 2012/03/30 06:09:54 ajacoutot Exp $ +--- lib/clplumbing/realtime.c.orig Fri Mar 23 18:05:27 2012 ++++ lib/clplumbing/realtime.c Sat Mar 24 10:19:25 2012 +@@ -31,7 +31,7 @@ + # include + # include + #endif +-#ifdef _POSIX_PRIORITY_SCHEDULING ++#if defined(_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING > 0) + # include + #endif + #include +@@ -44,7 +44,7 @@ + static gboolean cl_realtimepermitted = TRUE; + static void cl_rtmalloc_setup(void); + +-#if defined(SCHED_RR) && defined(_POSIX_PRIORITY_SCHEDULING) && !defined(ON_DARWIN) ++#if defined(_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING > 0) && defined(SCHED_RR) && !defined(ON_DARWIN) + # define DEFAULT_REALTIME SCHED_RR + #endif + diff --git a/sysutils/heartbeat/patches/patch-lib_stonith_expect_c b/sysutils/heartbeat/patches/patch-lib_stonith_expect_c new file mode 100644 index 00000000000..200492f8b15 --- /dev/null +++ b/sysutils/heartbeat/patches/patch-lib_stonith_expect_c @@ -0,0 +1,21 @@ +$OpenBSD: patch-lib_stonith_expect_c,v 1.1 2012/03/30 06:09:54 ajacoutot Exp $ +--- lib/stonith/expect.c.orig Fri Mar 23 18:01:26 2012 ++++ lib/stonith/expect.c Sat Mar 24 10:19:56 2012 +@@ -47,7 +47,7 @@ + #define ENABLE_PIL_DEFS_PRIVATE + #include + +-#ifdef _POSIX_PRIORITY_SCHEDULING ++#if defined(_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING > 0) + # include + #endif + +@@ -301,7 +301,7 @@ StartProcess(const char * cmd, int * readfd, int * wri + dup2(rdpipe[1], 1); + close(rdpipe[0]); + close(rdpipe[1]); +-#if defined(SCHED_OTHER) && !defined(ON_DARWIN) ++#if defined(_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING > 0) && defined(SCHED_OTHER) && !defined(ON_DARWIN) + { + /* + * Try and (re)set our scheduling to "normal"