summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Schleifer <js@heap.zone>2019-05-06 01:02:36 +0200
committerJonathan Schleifer <js@heap.zone>2019-05-06 01:02:36 +0200
commit2a832881fb89fce88f4d718988194e550c53dd4b (patch)
tree8c290aa480211f5f3c85cabc0afe4838e451fa6a
parent992f1edcec6747696b53a06ff095c87acf987ff0 (diff)
OFTCPSocket: Work around missing EPROTO
This is required for MorphOS.
-rw-r--r--src/OFTCPSocket.m8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/OFTCPSocket.m b/src/OFTCPSocket.m
index 57b72d41..4579294b 100644
--- a/src/OFTCPSocket.m
+++ b/src/OFTCPSocket.m
@@ -456,7 +456,7 @@ static uint16_t defaultSOCKS5Port = 1080;
switch (response[1]) {
case 0x02:
- errNo = EACCES;
+ errNo = EPERM;
break;
case 0x03:
errNo = ENETUNREACH;
@@ -471,13 +471,17 @@ static uint16_t defaultSOCKS5Port = 1080;
errNo = ETIMEDOUT;
break;
case 0x07:
- errNo = EPROTONOSUPPORT;
+ errNo = ENOTSUP;
break;
case 0x08:
errNo = EAFNOSUPPORT;
break;
default:
+#ifdef EPROTO
errNo = EPROTO;
+#else
+ errNo = 0;
+#endif
break;
}