Quote:
Originally Posted by hack2003
well i left the murmur stuff cause of so many to do for it to work on openbsd.
|
I know this thread is dead, but I wanted this information here for everyone's benefit.
uMurmur is a lightweight alternative to murmur that is compatible with Mumble 1.2.x. You can get it
here.
You need some patches to get it to build on OpenBSD, but I've done the work for you =) (posted earlier today to my blog on
LQ.org. This isn't tested yet other than building on amd64 and sparc64. I'll post a followup once I've tested it out.). I may attempt porting murmur to OpenBSD later if I get the time.
Any comments and suggestions for improvements from BSD gurus is more than welcome...
Patches:
Makefile
Code:
--- Makefile.orig Mon Dec 20 08:54:23 2010
+++ Makefile Mon Dec 20 09:27:37 2010
@@ -24,10 +24,10 @@
# OpenSSL - usually installed at a standard place
# EXTRA_CFLAGS:=
-# EXTRA_LDFLAGS:=-lcrypto -lssl
+EXTRA_LDFLAGS:=-lcrypto -lssl
-CFLAGS:=$(CFLAGS) -I. -Wall $(EXTRA_CFLAGS)
-LDFLAGS:=$(EXTRA_LDFLAGS) $(LDFLAGS) -lconfig
+CFLAGS:=$(CFLAGS) -I. -I/usr/include/openssl -I/usr/local/include -Wall $(EXTRA_CFLAGS)
+LDFLAGS:=$(EXTRA_LDFLAGS) $(LDFLAGS) -L/usr/local/lib -lconfig
umurmurd:google/protobuf-c/libprotobuf_c.a $(OBJS)
$(CC) $(LDFLAGS) $(OBJS) $(SSL_LIB) google/protobuf-c/libprotobuf_c.a -o umurmurd
client.c
Code:
--- client.c.orig Mon Dec 20 08:52:10 2010
+++ client.c Mon Dec 20 08:52:29 2010
@@ -29,6 +29,7 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/poll.h>
+#include <sys/types.h>
#include <sys/socket.h>
#include <fcntl.h>
#include <errno.h>
main.c
Code:
--- main.c.orig Mon Dec 20 09:21:01 2010
+++ main.c Mon Dec 20 09:22:24 2010
@@ -111,18 +111,7 @@
}
-void setscheduler()
-{
- int rc;
- struct sched_param sp;
- sp.sched_priority = sched_get_priority_min(SCHED_RR); /* Should suffice */
- Log_info("Setting SCHED_RR prio %d", sp.sched_priority);
- rc = sched_setscheduler(0, SCHED_RR, &sp);
- if (rc < 0)
- Log_warn("Failed to set scheduler: %s", strerror(errno));
-}
-
void printhelp()
{
printf("uMurmur version %s. Mumble protocol %d.%d.%d\n", UMURMUR_VERSION, PROTVER_MAJOR, PROTVER_MINOR, PROTVER_PATCH);
@@ -130,7 +119,6 @@
printf(" -d - Do not deamonize\n");
printf(" -p <pidfile> - Write PID to this file\n");
printf(" -c <conf file> - Specify configuration file\n");
- printf(" -r - Run with realtime priority\n");
printf(" -a <address> - Bind to IP address\n");
printf(" -b <port> - Bind to port\n");
printf(" -h - Print this help\n");
@@ -140,13 +128,12 @@
int main(int argc, char **argv)
{
bool_t nodaemon = false;
- bool_t realtime = false;
char *conffile = NULL, *pidfile = NULL;
int c;
struct utsname utsbuf;
/* Arguments */
- while ((c = getopt(argc, argv, "drp:c:a:b:h")) != EOF) {
+ while ((c = getopt(argc, argv, "dp:c:a:b:h")) != EOF) {
switch(c) {
case 'c':
conffile = optarg;
@@ -166,9 +153,6 @@
case 'h':
printhelp();
break;
- case 'r':
- realtime = true;
- break;
default:
fprintf(stderr, "Unrecognized option\n");
printhelp();
@@ -213,9 +197,6 @@
Chan_init();
Client_init();
- if (realtime)
- setscheduler();
-
Server_run();
SSLi_deinit();