| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- Index: Makefile.defs
- --- Makefile.defs.orig 2007-08-16 16:23:20 +0200
- +++ Makefile.defs 2007-11-24 19:39:03 +0100
- @@ -983,6 +983,8 @@
-
- endif #mode=release
-
- +LDFLAGS += -L$(prefix)/lib
- +LIBS += -lfsl
-
- #*FLAGS used for compiling the modules
- ifeq ($(CC_NAME), gcc)
- @@ -1205,8 +1207,8 @@
-
- #add libssl if needed
- ifneq ($(TLS),)
- -DEFS+= -I$(LOCALBASE)/ssl/include
- -LIBS+= -L$(LOCALBASE)/lib -L$(LOCALBASE)/ssl/lib -lssl -lcrypto
- +DEFS+= -I$(prefix)/include
- +LIBS+= -L$(prefix)/lib -lssl -lcrypto
- endif
-
- ifneq ($(found_lock_method), yes)
- Index: modules/permissions/parse_config.c
- --- modules/permissions/parse_config.c.orig 2007-08-16 16:22:57 +0200
- +++ modules/permissions/parse_config.c 2007-11-24 19:39:03 +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/main.c
- --- rtpproxy/main.c.orig 2007-11-23 11:17:02 +0100
- +++ rtpproxy/main.c 2007-11-24 19:39:55 +0100
- @@ -40,7 +40,7 @@
- #include <sys/select.h>
- #include <sys/stat.h>
- #include <assert.h>
- -#if !defined(__solaris__)
- +#if !defined(__sun__)
- #include <err.h>
- #endif
- #include <errno.h>
- @@ -113,7 +113,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
- @@ -371,10 +375,9 @@
-
- rtpp_log_write(RTPP_LOG_DBUG, cf->glog, "received command \"%s\"", buf);
-
- - cp = buf;
- argc = 0;
- memset(argv, 0, sizeof(argv));
- - for (ap = argv; (*ap = strsep(&cp, "\r\n\t ")) != NULL;)
- + for (ap = argv, cp = strtok(buf, "\r\n\t "); (cp = strtok(NULL, "\r\n\t ")) != NULL;)
- if (**ap != '\0') {
- argc++;
- if (++ap >= &argv[10])
- @@ -651,7 +654,11 @@
- }
- } else {
- rtpp_log_write(RTPP_LOG_ERR, cf->glog, "getaddrinfo: %s",
- +#if defined(__sun__)
- + "unknown");
- +#else
- gai_strerror(n));
- +#endif
- }
- }
- }
- @@ -1222,7 +1229,7 @@
- if (cf->umode == 0) {
- unlink(cmd_sock);
- memset(&ifsun, '\0', sizeof ifsun);
- -#if !defined(__linux__) && !defined(__solaris__)
- +#if !defined(__linux__) && !defined(__sun__)
- ifsun.sun_len = strlen(cmd_sock);
- #endif
- ifsun.sun_family = AF_LOCAL;
- @@ -1537,7 +1544,7 @@
-
- controlfd = init_controlfd(&cf);
-
- -#if !defined(__solaris__)
- +#if !defined(__sun__)
- if (cf.nodaemon == 0) {
- if (daemon(0, 0) == -1)
- err(1, "can't switch into daemon mode");
- Index: rtpproxy/rtpp_util.h
- --- rtpproxy/rtpp_util.h.orig 2007-07-28 10:17:02 +0200
- +++ rtpproxy/rtpp_util.h 2007-11-24 19:39:03 +0100
- @@ -84,7 +84,7 @@
- #define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
- #endif
-
- -#if defined(__solaris__)
- +#if defined(__sun__)
- #define err(exitcode, format, args...) \
- errx(exitcode, format ": %s", ## args, strerror(errno))
- #define errx(exitcode, format, args...) \
|