michael@377: Index: main.c michael@377: diff -Nau main.c.orig main.c michael@377: --- main.c.orig 2008-06-17 05:19:48 +0200 michael@377: +++ main.c 2008-08-09 11:58:55 +0200 michael@377: @@ -86,7 +86,11 @@ michael@377: bindhost = NULL; michael@377: michael@377: if ((n = resolve(ia, pf, bindhost, servname, AI_PASSIVE)) != 0) michael@377: +#if defined(__sun__) michael@377: + errx(1, "setbindhost"); michael@377: +#else michael@377: errx(1, "setbindhost: %s", gai_strerror(n)); michael@377: +#endif michael@377: } michael@377: michael@377: static void michael@377: Index: rtpp_command.c michael@377: diff -Nau rtpp_command.c.orig rtpp_command.c michael@377: --- rtpp_command.c.orig 2009-03-25 02:53:17.397562078 +0100 michael@377: +++ rtpp_command.c 2009-03-25 02:52:59.126654989 +0100 michael@377: @@ -72,6 +72,36 @@ michael@377: static void handle_query(struct cfg *, int, struct sockaddr_storage *, michael@377: socklen_t, char *, struct rtpp_session *, int); michael@377: michael@547: +#if defined(__sun) && defined(__SVR4) && !defined(GE_SOL11) michael@377: +static char michael@377: +*strsep(char **stringp, const char *delim) michael@377: +{ michael@377: + char *s; michael@377: + const char *spanp; michael@377: + int c, sc; michael@377: + char *tok; michael@377: + michael@377: + if ((s = *stringp) == NULL) michael@377: + return NULL; michael@377: + for (tok = s;;) { michael@377: + c = *s++; michael@377: + spanp = delim; michael@377: + do { michael@377: + if ((sc = *spanp++) == c) { michael@377: + if (c == 0) michael@377: + s = NULL; michael@377: + else michael@377: + s[-1] = 0; michael@377: + *stringp = s; michael@377: + return tok; michael@377: + } michael@377: + } while (sc != 0); michael@377: + } michael@377: + /* NOTREACHED */ michael@377: + return NULL; michael@377: +} michael@377: + michael@377: +#endif michael@377: static int michael@377: create_twinlistener(struct cfg *cf, struct sockaddr *ia, int port, int *fds) michael@377: {