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