summaryrefslogtreecommitdiff
path: root/src/basic/fd-util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/basic/fd-util.h')
-rw-r--r--src/basic/fd-util.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/basic/fd-util.h b/src/basic/fd-util.h
index 5ce1592eeb..973413ff42 100644
--- a/src/basic/fd-util.h
+++ b/src/basic/fd-util.h
@@ -73,3 +73,6 @@ int same_fd(int a, int b);
void cmsg_close_all(struct msghdr *mh);
bool fdname_is_valid(const char *s);
+
+#define ERRNO_IS_DISCONNECT(r) \
+ IN_SET(r, ENOTCONN, ECONNRESET, ECONNREFUSED, ECONNABORTED, EPIPE)