From dd662ecacadcbc492f61bbaa72c8ef955daaa4c2 Mon Sep 17 00:00:00 2001 From: Michael Ortmann <41313082+michaelortmann@users.noreply.github.com> Date: Sun, 7 Nov 2021 03:04:18 +0100 Subject: [PATCH 1/2] sys/socket.h is included by eggdrop.h, so, anything including eggdrop.h directly or indirectly doesnt need to include sys/socket.h explicitely --- src/compat/gethostbyname2.h | 3 --- src/compat/inet_aton.h | 3 --- src/dns.c | 1 - src/mod/uptime.mod/uptime.c | 1 - src/net.c | 1 - 5 files changed, 9 deletions(-) diff --git a/src/compat/gethostbyname2.h b/src/compat/gethostbyname2.h index 54d80ca6a..51df2ee68 100644 --- a/src/compat/gethostbyname2.h +++ b/src/compat/gethostbyname2.h @@ -26,9 +26,6 @@ #include "src/main.h" #include -#ifdef HAVE_SYS_SOCKET_H -# include -#endif #include #if defined IPV6 && !defined HAVE_GETHOSTBYNAME2 diff --git a/src/compat/inet_aton.h b/src/compat/inet_aton.h index a37ddce2d..30065b705 100644 --- a/src/compat/inet_aton.h +++ b/src/compat/inet_aton.h @@ -24,9 +24,6 @@ #define _EGG_COMPAT_INET_ATON_H #include "src/main.h" -#ifdef HAVE_SYS_SOCKET_H -# include -#endif #include #include diff --git a/src/dns.c b/src/dns.c index 1d7d5ad16..549e51690 100644 --- a/src/dns.c +++ b/src/dns.c @@ -26,7 +26,6 @@ #include "main.h" #include -#include #include #include #include "dns.h" diff --git a/src/mod/uptime.mod/uptime.c b/src/mod/uptime.mod/uptime.c index b557ae805..e1bcacabe 100644 --- a/src/mod/uptime.mod/uptime.c +++ b/src/mod/uptime.mod/uptime.c @@ -40,7 +40,6 @@ #include #include #include -#include #include #include #include diff --git a/src/net.c b/src/net.c index 9a25e3a91..c27a5839e 100644 --- a/src/net.c +++ b/src/net.c @@ -30,7 +30,6 @@ #include #include #include -#include #if HAVE_SYS_SELECT_H # include #endif From ba125b605aae5e3feffe3899d2575dd12acd893c Mon Sep 17 00:00:00 2001 From: Michael Ortmann <41313082+michaelortmann@users.noreply.github.com> Date: Sun, 7 Nov 2021 03:28:49 +0100 Subject: [PATCH 2/2] same with netinet/in.h --- src/compat/gethostbyname2.h | 1 - src/compat/inet_aton.h | 1 - src/dns.c | 1 - src/mod/ctcp.mod/ctcp.c | 1 - src/mod/share.mod/share.c | 1 - src/mod/transfer.mod/transfer.c | 1 - src/mod/uptime.mod/uptime.c | 1 - src/net.c | 1 - src/users.c | 1 - 9 files changed, 9 deletions(-) diff --git a/src/compat/gethostbyname2.h b/src/compat/gethostbyname2.h index 51df2ee68..c49eba302 100644 --- a/src/compat/gethostbyname2.h +++ b/src/compat/gethostbyname2.h @@ -26,7 +26,6 @@ #include "src/main.h" #include -#include #if defined IPV6 && !defined HAVE_GETHOSTBYNAME2 struct hostent *gethostbyname2(const char *name, int af); diff --git a/src/compat/inet_aton.h b/src/compat/inet_aton.h index 30065b705..c69ff2e59 100644 --- a/src/compat/inet_aton.h +++ b/src/compat/inet_aton.h @@ -24,7 +24,6 @@ #define _EGG_COMPAT_INET_ATON_H #include "src/main.h" -#include #include #ifndef HAVE_INET_ATON diff --git a/src/dns.c b/src/dns.c index 549e51690..0f36267b1 100644 --- a/src/dns.c +++ b/src/dns.c @@ -26,7 +26,6 @@ #include "main.h" #include -#include #include #include "dns.h" #ifdef EGG_TDNS diff --git a/src/mod/ctcp.mod/ctcp.c b/src/mod/ctcp.mod/ctcp.c index f50bcd19e..7bc8d326e 100644 --- a/src/mod/ctcp.mod/ctcp.c +++ b/src/mod/ctcp.mod/ctcp.c @@ -27,7 +27,6 @@ #include "ctcp.h" #include "src/mod/module.h" #include "server.mod/server.h" -#include #include static Function *global = NULL, *server_funcs = NULL; diff --git a/src/mod/share.mod/share.c b/src/mod/share.mod/share.c index 995f7ad62..19658087d 100644 --- a/src/mod/share.mod/share.c +++ b/src/mod/share.mod/share.c @@ -26,7 +26,6 @@ #include "src/mod/module.h" -#include #include #include diff --git a/src/mod/transfer.mod/transfer.c b/src/mod/transfer.mod/transfer.c index 7dabe5d3c..8d15f4e3e 100644 --- a/src/mod/transfer.mod/transfer.c +++ b/src/mod/transfer.mod/transfer.c @@ -35,7 +35,6 @@ #include "src/users.h" #include "transfer.h" -#include #include diff --git a/src/mod/uptime.mod/uptime.c b/src/mod/uptime.mod/uptime.c index e1bcacabe..29efe1581 100644 --- a/src/mod/uptime.mod/uptime.c +++ b/src/mod/uptime.mod/uptime.c @@ -35,7 +35,6 @@ #include "../module.h" #include "../server.mod/server.h" #include -#include #include #include #include diff --git a/src/net.c b/src/net.c index c27a5839e..214204335 100644 --- a/src/net.c +++ b/src/net.c @@ -33,7 +33,6 @@ #if HAVE_SYS_SELECT_H # include #endif -#include #include #include #include diff --git a/src/users.c b/src/users.c index 133ba73d7..2d70e9afe 100644 --- a/src/users.c +++ b/src/users.c @@ -35,7 +35,6 @@ #include "modules.h" #include "tandem.h" -#include #include extern struct dcc_t *dcc;