projects
/
umurmur.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
dd6d831
)
Fix building on OSX.
author
Martin Johansson
<martin@fatbob.nu>
Thu, 10 Nov 2011 13:41:20 +0000
(14:41 +0100)
committer
Martin Johansson
<martin@fatbob.nu>
Thu, 10 Nov 2011 13:41:20 +0000
(14:41 +0100)
src/main.c
patch
|
blob
|
history
diff --git
a/src/main.c
b/src/main.c
index bcefa1d95382d32254d5ddb8fab2f6d247904f59..e0010fe684a296cbbdbf950a5393db5e9fc90893 100644
(file)
--- a/
src/main.c
+++ b/
src/main.c
@@
-42,8
+42,11
@@
#include <string.h>
#include <stdlib.h>
#ifdef _POSIX_PRIORITY_SCHEDULING
#include <string.h>
#include <stdlib.h>
#ifdef _POSIX_PRIORITY_SCHEDULING
+#if (_POSIX_PRIORITY_SCHEDULING > 0)
+#define POSIX_PRIORITY_SCHEDULING
#include <sched.h>
#endif
#include <sched.h>
#endif
+#endif
#include "server.h"
#include "ssl.h"
#include "channel.h"
#include "server.h"
#include "ssl.h"
#include "channel.h"
@@
-200,7
+203,7
@@
void daemonize()
}
}
-#ifdef
_
POSIX_PRIORITY_SCHEDULING
+#ifdef POSIX_PRIORITY_SCHEDULING
void setscheduler()
{
int rc;
void setscheduler()
{
int rc;
@@
-219,7
+222,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 <pidfile>] [-t] [-c <conf file>] [-a <addr>] [-b <port>]\n");
printf(" -d - Do not daemonize - run in foreground.\n");
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 <pidfile>] [-t] [-c <conf file>] [-a <addr>] [-b <port>]\n");
printf(" -d - Do not daemonize - run in foreground.\n");
-#ifdef
_
POSIX_PRIORITY_SCHEDULING
+#ifdef POSIX_PRIORITY_SCHEDULING
printf(" -r - Run with realtime priority\n");
#endif
printf(" -p <pidfile> - Write PID to this file\n");
printf(" -r - Run with realtime priority\n");
#endif
printf(" -p <pidfile> - Write PID to this file\n");
@@
-234,7
+237,7
@@
void printhelp()
int main(int argc, char **argv)
{
bool_t nodaemon = false;
int main(int argc, char **argv)
{
bool_t nodaemon = false;
-#ifdef
_
POSIX_PRIORITY_SCHEDULING
+#ifdef POSIX_PRIORITY_SCHEDULING
bool_t realtime = false;
#endif
bool_t testconfig = false;
bool_t realtime = false;
#endif
bool_t testconfig = false;
@@
-243,7
+246,7
@@
int main(int argc, char **argv)
struct utsname utsbuf;
/* Arguments */
struct utsname utsbuf;
/* Arguments */
-#ifdef
_
POSIX_PRIORITY_SCHEDULING
+#ifdef POSIX_PRIORITY_SCHEDULING
while ((c = getopt(argc, argv, "drp:c:a:b:ht")) != EOF) {
#else
while ((c = getopt(argc, argv, "dp:c:a:b:ht")) != EOF) {
while ((c = getopt(argc, argv, "drp:c:a:b:ht")) != EOF) {
#else
while ((c = getopt(argc, argv, "dp:c:a:b:ht")) != EOF) {
@@
-270,7
+273,7
@@
int main(int argc, char **argv)
case 't':
testconfig = true;
break;
case 't':
testconfig = true;
break;
-#ifdef
_
POSIX_PRIORITY_SCHEDULING
+#ifdef POSIX_PRIORITY_SCHEDULING
case 'r':
realtime = true;
break;
case 'r':
realtime = true;
break;
@@
-334,7
+337,7
@@
int main(int argc, char **argv)
Chan_init();
Client_init();
Chan_init();
Client_init();
-#ifdef
_
POSIX_PRIORITY_SCHEDULING
+#ifdef POSIX_PRIORITY_SCHEDULING
if (realtime)
setscheduler();
#endif
if (realtime)
setscheduler();
#endif