Add missing support for -port in whatnow.
Make sure the SASL input buffer is allocated when using the sendmail mts.
 static int sm_fwrite(char *, int);
 static int sm_fputs(char *);
 static int sm_fputc(int);
-static int sm_getc(void);
+static int sm_fgetc(FILE *);
 static void sm_fflush(void);
 static int sm_fgets(char *, int, FILE *);
 
        client = "localhost";
 #endif
 
+#ifdef CYRUS_SASL
+    sasl_inbuffer = malloc(SASL_MAXRECVBUF);
+    if (!sasl_inbuffer)
+       return sm_ierror("Unable to allocate %d bytes for read buffer",
+                        SASL_MAXRECVBUF);
+#endif /* CYRUS_SASL */
+
     if (pipe (pdi) == NOTOK)
        return sm_ierror ("no pipes");
     if (pipe (pdo) == NOTOK) {
 
                char address[NI_MAXHOST];
 
                rc = getnameinfo(ai->ai_addr, ai->ai_addrlen, address,
-                                sizeof(address), NULL, NULL, NI_NUMERICHOST);
+                                sizeof(address), NULL, 0, NI_NUMERICHOST);
 
                fprintf(stderr, "Connecting to %s...\n",
                        rc ? "unknown" : address);
 
                case SERVSW:
                case SASLMECHSW:
                case USERSW:
+               case PORTSW:
                    vec[vecp++] = --cp;
                    if (!(cp = *argp++) || *cp == '-') {
                        advise (NULL, "missing argument to %s", argp[-2]);