git://git.exim.org
/
users
/
heiko
/
exim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2e9e785
)
Fix build on platforms not supporting sockopt SO_PROTOCOL
author
Jeremy Harris
<jgh146exb@wizmail.org>
Sat, 2 May 2020 20:09:38 +0000
(21:09 +0100)
committer
Jeremy Harris
<jgh146exb@wizmail.org>
Sat, 2 May 2020 20:09:38 +0000
(21:09 +0100)
Broken-by: a8e46b3b71
src/src/debug.c
patch
|
blob
|
history
diff --git
a/src/src/debug.c
b/src/src/debug.c
index 806573f1cc8917e42372c3579b21cba7b26cfde7..3a7d6a6f51b2e30b7abdbd412b623f9b476a02ac 100644
(file)
--- 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