Index: Makefile.defs
--- Makefile.defs.orig	2009-03-23 19:32:01 +0100
+++ Makefile.defs	2009-03-24 19:10:36 +0100
@@ -1161,6 +1161,8 @@
 
 endif #mode=release
 
+LDFLAGS += -L$(prefix)/lib
+LIBS    += -lfsl
 
 #*FLAGS used for compiling the modules
 ifeq	($(CC_NAME), gcc)
@@ -1397,8 +1399,8 @@
 
 #add libssl if needed
 ifneq ($(TLS),)
-DEFS+= -I$(LOCALBASE)/ssl/include -I$(LOCALBASE)/include -I$(SYSBASE)/include/openssl
-LIBS+= -L$(LOCALBASE)/lib -L$(LOCALBASE)/ssl/lib -lssl  -lcrypto
+DEFS+= -I$(prefix)/include
+LIBS+= -L$(prefix)/lib -lssl -lcrypto
 endif
 
 #add libsctp if needed
Index: modules/permissions/parse_config.c
--- modules/permissions/parse_config.c.orig	2009-03-23 19:31:32 +0100
+++ modules/permissions/parse_config.c	2009-03-24 19:10:36 +0100
@@ -114,8 +114,11 @@
 	except = strstr(str, " EXCEPT ");
 	if (except) {
 		/* exception found */
-		strncpy(str2, str, except-str);
-		str2[except-str] = '\0';
+		int l = except - str;
+		if (l > sizeof(str2) - 1)
+			l = sizeof(str2) - 1;
+		strncpy(str2, str, l);
+		str2[l] = '\0';
 		/* except+8 points to the exception */
 		if (parse_expression_list(except+8, e_exceptions)) {
 			/* error */
@@ -124,7 +127,8 @@
 		}
 	} else {
 		/* no exception */
-		strcpy(str2, str);
+		strncpy(str2, str, sizeof(str2)-1);
+		str2[sizeof(str2)-1] = '\0';
 		*e_exceptions = NULL;
 	}
 
Index: rtpproxy-1.2.1/main.c
--- rtpproxy-1.2.1/main.c.orig	2009-03-24 05:46:13 +0100
+++ rtpproxy-1.2.1/main.c	2009-03-24 19:10:36 +0100
@@ -88,7 +88,11 @@
 	bindhost = NULL;
 
     if ((n = resolve(ia, pf, bindhost, servname, AI_PASSIVE)) != 0)
+#if defined(__sun__)
+	errx(1, "setbindhost");
+#else
 	errx(1, "setbindhost: %s", gai_strerror(n));
+#endif
 }
 
 static void
