On Sat, Jan 26, 2019 at 09:50:41PM +0100, Caspar Schutijser wrote: > Below is a diff that (attempts to) clean up the list of includes in > unwind. I added some missing includes, too. The hashes of the relevant > object files (control.o, frontend.o, printconf.o, resolver.o and > unwind.o) did not change. I'm not sure if I'm supposed to touch > control.c but I did it anyway.
Currently nobody is working on unifying the various control.c in the tree. I expect that they already diverged a bit. So I commited that as well, maybe as a hint for people coming later and looking at unifying control.c > > I did not look at (uw_)log.c since it is shared with many other deamons. That is correct. I'm glad you got rid of that assert.h, that was bugging me. (Turns out it comes in via config.h, so not necessarily too much better, but I was worried that libunbound would not be self contained). Thank you, this is very helpful! > > Thanks, > Caspar Schutijser > > > Index: control.c > =================================================================== > RCS file: /cvs/src/sbin/unwind/control.c,v > retrieving revision 1.1 > diff -u -p -r1.1 control.c > --- control.c 23 Jan 2019 13:11:00 -0000 1.1 > +++ control.c 26 Jan 2019 20:30:02 -0000 > @@ -19,16 +19,12 @@ > #include <sys/queue.h> > #include <sys/stat.h> > #include <sys/socket.h> > -#include <sys/uio.h> > +#include <sys/time.h> > #include <sys/un.h> > > -#include <netinet/in.h> > -#include <net/if.h> > - > #include <errno.h> > #include <event.h> > #include <imsg.h> > -#include <md5.h> > #include <stdlib.h> > #include <string.h> > #include <unistd.h> > Index: frontend.c > =================================================================== > RCS file: /cvs/src/sbin/unwind/frontend.c,v > retrieving revision 1.3 > diff -u -p -r1.3 frontend.c > --- frontend.c 24 Jan 2019 17:39:43 -0000 1.3 > +++ frontend.c 26 Jan 2019 20:30:02 -0000 > @@ -20,38 +20,29 @@ > */ > > #include <sys/types.h> > -#include <sys/ioctl.h> > #include <sys/queue.h> > #include <sys/socket.h> > #include <sys/syslog.h> > #include <sys/uio.h> > > +#include <netinet/in.h> > #include <net/if.h> > -#include <net/if_dl.h> > -#include <net/if_types.h> > #include <net/route.h> > > -#include <arpa/nameser.h> > -#include <arpa/inet.h> > - > -#include <ctype.h> > #include <errno.h> > #include <event.h> > -#include <ifaddrs.h> > #include <imsg.h> > #include <netdb.h> > #include <pwd.h> > #include <signal.h> > +#include <stdint.h> > #include <stdio.h> > #include <stdlib.h> > #include <string.h> > +#include <time.h> > #include <unistd.h> > > -#include <assert.h> > #include "libunbound/config.h" > -#include "libunbound/libunbound/unbound.h" > -#include "libunbound/unbound-event.h" > -#include "libunbound/sldns/rrdef.h" > #include "libunbound/sldns/pkthdr.h" > #include "libunbound/sldns/sbuffer.h" > #include "libunbound/sldns/wire2str.h" > Index: printconf.c > =================================================================== > RCS file: /cvs/src/sbin/unwind/printconf.c,v > retrieving revision 1.1 > diff -u -p -r1.1 printconf.c > --- printconf.c 23 Jan 2019 13:11:00 -0000 1.1 > +++ printconf.c 26 Jan 2019 20:30:02 -0000 > @@ -17,15 +17,7 @@ > * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. > */ > > -#include <sys/types.h> > #include <sys/queue.h> > -#include <sys/socket.h> > -#include <sys/uio.h> > - > -#include <netinet/in.h> > -#include <net/if.h> > - > -#include <arpa/inet.h> > > #include <event.h> > #include <imsg.h> > Index: resolver.c > =================================================================== > RCS file: /cvs/src/sbin/unwind/resolver.c,v > retrieving revision 1.9 > diff -u -p -r1.9 resolver.c > --- resolver.c 25 Jan 2019 17:20:45 -0000 1.9 > +++ resolver.c 26 Jan 2019 20:30:02 -0000 > @@ -23,16 +23,12 @@ > #include <sys/queue.h> > #include <sys/socket.h> > #include <sys/syslog.h> > -#include <sys/uio.h> > - > -#include <netinet/in.h> > -#include <net/if.h> > -#include <arpa/inet.h> > +#include <sys/time.h> > > #include <errno.h> > #include <event.h> > -#include <netdb.h> > #include <imsg.h> > +#include <limits.h> > #include <pwd.h> > #include <pthread.h> > #include <signal.h> > @@ -42,13 +38,11 @@ > #include <time.h> > #include <unistd.h> > > -#include <assert.h> > #include "libunbound/config.h" > #include "libunbound/libunbound/unbound.h" > #include "libunbound/unbound-event.h" > #include "libunbound/sldns/rrdef.h" > #include "libunbound/sldns/pkthdr.h" > -#include "libunbound/sldns/sbuffer.h" > #include "libunbound/sldns/wire2str.h" > > #include <openssl/crypto.h> > Index: unwind.c > =================================================================== > RCS file: /cvs/src/sbin/unwind/unwind.c,v > retrieving revision 1.3 > diff -u -p -r1.3 unwind.c > --- unwind.c 25 Jan 2019 08:06:15 -0000 1.3 > +++ unwind.c 26 Jan 2019 20:30:02 -0000 > @@ -22,16 +22,10 @@ > #include <sys/queue.h> > #include <sys/socket.h> > #include <sys/syslog.h> > -#include <sys/uio.h> > #include <sys/wait.h> > > -#include <netinet/in.h> > #include <net/if.h> > #include <net/route.h> > -#include <netinet/in.h> > -#include <netinet/if_ether.h> > -#include <netinet6/in6_var.h> > -#include <netinet/icmp6.h> > > #include <err.h> > #include <errno.h> > -- I'm not entirely sure you are real.