mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-04 22:33:27 +00:00
96a7483d0d
Submitted by: davidn
28 lines
660 B
Plaintext
28 lines
660 B
Plaintext
*** sshconnect.c.orig Thu Jan 30 23:00:03 1997
|
|
--- sshconnect.c Thu Jan 30 23:00:04 1997
|
|
***************
|
|
*** 239,244 ****
|
|
--- 239,250 ----
|
|
{
|
|
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);
|
|
***************
|
|
*** 266,271 ****
|
|
--- 272,278 ----
|
|
}
|
|
fatal("bind: %.100s", strerror(errno));
|
|
}
|
|
+ #endif
|
|
debug("Allocated local port %d.", p);
|
|
}
|
|
else
|