summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2020-05-02 21:09:38 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2020-05-02 21:09:38 +0100
commit9ffec364844aaf19ed4bb275760fdb30de5e91ca (patch)
treeeb2fa457e3966decb1292704fd696a10a1c201db /src
parent2e9e7858462e0041feadda0e1fb67ae852dacf01 (diff)
Fix build on platforms not supporting sockopt SO_PROTOCOL
Broken-by: a8e46b3b71
Diffstat (limited to 'src')
-rw-r--r--src/src/debug.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/src/debug.c b/src/src/debug.c
index 806573f1c..3a7d6a6f5 100644
--- a/src/src/debug.c
+++ b/src/src/debug.c
@@ -379,6 +379,7 @@ if (fstat(fd, &s) == 0 && (s.st_mode & S_IFMT) == S_IFSOCK)
case SOCK_DGRAM: g = string_cat(g, US" type SOCK_DGRAM"); break;
default: g = string_fmt_append(g, " type %d", val); break;
}
+#ifdef SO_PROTOCOL
if (getsockopt(fd, SOL_SOCKET, SO_PROTOCOL, &val, &vlen) == 0)
{
struct protoent * p = getprotobynumber(val);
@@ -386,6 +387,7 @@ if (fstat(fd, &s) == 0 && (s.st_mode & S_IFMT) == S_IFSOCK)
? string_fmt_append(g, " proto %s\n", p->p_name)
: string_fmt_append(g, " proto %d", val);
}
+#endif
debug_printf_indent(" socket: %s\n", string_from_gstring(g));
}
else