openser.patch 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. Index: Makefile.defs
  2. --- Makefile.defs.orig 2007-01-22 13:16:11 +0100
  3. +++ Makefile.defs 2007-01-22 17:28:29 +0100
  4. @@ -629,7 +629,7 @@
  5. ifeq ($(CC_SHORTVER), 4.x)
  6. CPU ?= ultrasparc
  7. #use 32bit for now
  8. - CFLAGS+=-mcpu=ultrasparc -minline-all-stringops \
  9. + CFLAGS+=-mcpu=ultrasparc \
  10. -mtune=$(CPU) \
  11. -ftree-vectorize
  12. else
  13. @@ -989,6 +989,8 @@
  14. endif #mode=release
  15. +LDFLAGS += -L$(prefix)/lib
  16. +LIBS += -lfsl
  17. #*FLAGS used for compiling the modules
  18. ifeq ($(CC_NAME), gcc)
  19. @@ -1203,8 +1205,8 @@
  20. #add libssl if needed
  21. ifneq ($(TLS),)
  22. -DEFS+= -I$(LOCALBASE)/ssl/include
  23. -LIBS+= -L$(LOCALBASE)/lib -L$(LOCALBASE)/ssl/lib -lssl -lcrypto
  24. +DEFS+= -I$(prefix)/include
  25. +LIBS+= -L$(prefix)/lib -lssl -lcrypto
  26. endif
  27. ifneq ($(found_lock_method), yes)
  28. Index: rtpproxy/main.c
  29. --- rtpproxy/main.c.orig 2006-07-05 02:14:19 +0200
  30. +++ rtpproxy/main.c 2007-01-22 17:28:29 +0100
  31. @@ -38,7 +38,7 @@
  32. #include <sys/select.h>
  33. #include <sys/stat.h>
  34. #include <assert.h>
  35. -#if !defined(__solaris__)
  36. +#if !defined(__sun__)
  37. #include <err.h>
  38. #endif
  39. #include <errno.h>
  40. @@ -128,7 +128,11 @@
  41. bindhost = NULL;
  42. if ((n = resolve(ia, pf, bindhost, servname, AI_PASSIVE)) != 0)
  43. +#if defined(__sun__)
  44. + errx(1, "setbindhost");
  45. +#else
  46. errx(1, "setbindhost: %s", gai_strerror(n));
  47. +#endif
  48. }
  49. static void
  50. @@ -386,10 +390,9 @@
  51. rtpp_log_write(RTPP_LOG_DBUG, glog, "received command \"%s\"", buf);
  52. - cp = buf;
  53. argc = 0;
  54. memset(argv, 0, sizeof(argv));
  55. - for (ap = argv; (*ap = strsep(&cp, "\r\n\t ")) != NULL;)
  56. + for (ap = argv, cp = strtok(buf, "\r\n\t "); (cp = strtok(NULL, "\r\n\t ")) != NULL;)
  57. if (**ap != '\0') {
  58. argc++;
  59. if (++ap >= &argv[10])
  60. @@ -642,7 +645,11 @@
  61. }
  62. } else {
  63. rtpp_log_write(RTPP_LOG_ERR, glog, "getaddrinfo: %s",
  64. +#if defined(__sun__)
  65. + "unknown");
  66. +#else
  67. gai_strerror(n));
  68. +#endif
  69. }
  70. }
  71. }
  72. @@ -1170,7 +1177,7 @@
  73. if (umode == 0) {
  74. unlink(cmd_sock);
  75. memset(&ifsun, '\0', sizeof ifsun);
  76. -#if !defined(__linux__) && !defined(__solaris__)
  77. +#if !defined(__linux__) && !defined(__sun__)
  78. ifsun.sun_len = strlen(cmd_sock);
  79. #endif
  80. ifsun.sun_family = AF_LOCAL;
  81. @@ -1203,7 +1210,7 @@
  82. flags = fcntl(controlfd, F_GETFL);
  83. fcntl(controlfd, F_SETFL, flags | O_NONBLOCK);
  84. -#if !defined(__solaris__)
  85. +#if !defined(__sun__)
  86. if (nodaemon == 0) {
  87. if (daemon(0, 0) == -1)
  88. err(1, "can't switch into daemon mode");
  89. Index: rtpproxy/rtpp_util.h
  90. --- rtpproxy/rtpp_util.h.orig 2006-04-13 06:29:19 +0200
  91. +++ rtpproxy/rtpp_util.h 2007-01-22 17:28:29 +0100
  92. @@ -83,7 +83,7 @@
  93. #define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
  94. #endif
  95. -#if defined(__solaris__)
  96. +#if defined(__sun__)
  97. #define err(exitcode, format, args...) \
  98. errx(exitcode, format ": %s", ## args, strerror(errno))
  99. #define errx(exitcode, format, args...) \