X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fbasic%2Ffd-util.h;h=e2f5bbdaf80a8c217833efeba3549d5430be6673;hb=0d904a6edf6566ed403e75f835f7cc03829e336e;hp=16304a1afa70f45d90d78814e8adcc3ce27ab9bc;hpb=c5729796b4ec5e5f4800bfe6bd9ceb5c2da81fbe;p=elogind.git
diff --git a/src/basic/fd-util.h b/src/basic/fd-util.h
index 16304a1af..e2f5bbdaf 100644
--- a/src/basic/fd-util.h
+++ b/src/basic/fd-util.h
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
#pragma once
/***
@@ -21,9 +19,9 @@
along with systemd; If not, see .
***/
-#include
#include
#include
+#include
#include
#include "macro.h"
@@ -77,3 +75,7 @@ void cmsg_close_all(struct msghdr *mh);
bool fdname_is_valid(const char *s);
#endif // 0
+
+/* Hint: ENETUNREACH happens if we try to connect to "non-existing" special IP addresses, such as ::5 */
+#define ERRNO_IS_DISCONNECT(r) \
+ IN_SET(r, ENOTCONN, ECONNRESET, ECONNREFUSED, ECONNABORTED, EPIPE, ENETUNREACH)