summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2010-03-26 11:09:44 +1100
committerDamien Miller <djm@mindrot.org>2010-03-26 11:09:44 +1100
commit6480c63b759eb8add9387220fd8ed630e0563316 (patch)
tree13ff0a11016025aa31ca30fd0fe33260fdffeeaa
parent8b90642fcf979737dc2f3152660b0561ec5b3a5d (diff)
- (djm) [channels.c] Check for EPFNOSUPPORT as a socket() errno; bz#1721
ok dtucker@
-rw-r--r--ChangeLog2
-rw-r--r--channels.c6
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index c569328f..f217bd83 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,8 @@
- (djm) [session.c] Allow ChrootDirectory to work on SELinux platforms -
set up SELinux execution context before chroot() call. From Russell
Coker via Colin watson; bz#1726 ok dtucker@
+ - (djm) [channels.c] Check for EPFNOSUPPORT as a socket() errno; bz#1721
+ ok dtucker@
20100324
- (dtucker) [contrib/cygwin/ssh-host-config] Mount the Windows directory
diff --git a/channels.c b/channels.c
index d8c53a4a..a55d2781 100644
--- a/channels.c
+++ b/channels.c
@@ -3252,7 +3252,11 @@ x11_create_display_inet(int x11_display_offset, int x11_use_localhost,
sock = socket(ai->ai_family, ai->ai_socktype,
ai->ai_protocol);
if (sock < 0) {
- if ((errno != EINVAL) && (errno != EAFNOSUPPORT)) {
+ if ((errno != EINVAL) && (errno != EAFNOSUPPORT)
+#ifdef EPFNOSUPPORT
+ && (errno != EPFNOSUPPORT)
+#endif
+ ) {
error("socket: %.100s", strerror(errno));
freeaddrinfo(aitop);
return -1;