*** sshconnect.c.orig Thu Mar 27 09:04:10 1997 --- sshconnect.c Sat Mar 29 01:16:51 1997 *************** *** 298,303 **** --- 298,309 ---- { struct sockaddr_in sin; int p; + #if defined(__FreeBSD__) && !defined(SOCKS) + p = 1023; /* Compat with old FreeBSD */ + sock = rresvport(&p); + if (sock < 0) + fatal("rresvport: %.100s", strerror(errno)); + #else for (p = 1023; p > 512; p--) { sock = socket(AF_INET, SOCK_STREAM, 0); *************** *** 325,330 **** --- 331,337 ---- } fatal("bind: %.100s", strerror(errno)); } + #endif debug("Allocated local port %d.", p); } else