From: Theo Buehler Subject: Re: relayd: remove unnecessary includes To: Rafael Sadowski Cc: tech@openbsd.org Date: Tue, 19 May 2026 11:51:09 +0200 On Tue, May 19, 2026 at 10:56:49AM +0200, Rafael Sadowski wrote: > OK? Not sure how you determined these. Generally it's not good to rely on headers to include other headers since it makes things fragile. Since relayd.h includes ssl.h, many public headers are "redundant" from there. The include-what-you-use port helps (but blindly following it also isn't great). > diff --git a/usr.sbin/relayd/check_icmp.c b/usr.sbin/relayd/check_icmp.c > index a8182cd4699..5a737e3795a 100644 > --- a/usr.sbin/relayd/check_icmp.c > +++ b/usr.sbin/relayd/check_icmp.c > @@ -32,7 +32,6 @@ > #include > #include > #include > -#include Used for NULL > > #include "relayd.h" > #include "log.h" > diff --git a/usr.sbin/relayd/check_script.c b/usr.sbin/relayd/check_script.c > index 6182b071b01..41ef0daf980 100644 > --- a/usr.sbin/relayd/check_script.c > +++ b/usr.sbin/relayd/check_script.c > @@ -22,7 +22,6 @@ > #include > #include > #include > -#include ditto > #include > #include > > diff --git a/usr.sbin/relayd/config.c b/usr.sbin/relayd/config.c > index ccf0ef4fa88..b8652d015a3 100644 > --- a/usr.sbin/relayd/config.c > +++ b/usr.sbin/relayd/config.c > @@ -24,7 +24,6 @@ > #include > #include > #include > -#include IOV_MAX > #include > #include > > diff --git a/usr.sbin/relayd/pfe_route.c b/usr.sbin/relayd/pfe_route.c > index 27afb352eef..c6e736ed48c 100644 > --- a/usr.sbin/relayd/pfe_route.c > +++ b/usr.sbin/relayd/pfe_route.c > @@ -25,9 +25,7 @@ > #include > #include > > -#include HOSTNAME_MAX > #include > -#include fine > #include > #include > #include > diff --git a/usr.sbin/relayd/relay.c b/usr.sbin/relayd/relay.c > index a035f996f0a..d0987121238 100644 > --- a/usr.sbin/relayd/relay.c > +++ b/usr.sbin/relayd/relay.c > @@ -26,7 +26,6 @@ > #include > #include > > -#include fine > #include > #include > #include >