[rbldnsd] [PATCH] fix compile on RH6

Michael Tokarev mjt at tls.msk.ru
Tue Mar 30 01:13:58 MSD 2004


Bradley Baetz wrote:
> The attached patch fixes a compile problem on RH6, where struct tm can't
> be found.
> 
> This extra include matches the select(2) manpage.
> 
> --- rbldnsd.c.orig	Mon Mar 29 08:25:44 2004
> +++ rbldnsd.c	Mon Mar 29 08:25:02 2004
> +#include <sys/time.h>

Hmm.  This one is interesting.
The only place where `struct tm' is used in source is in
rbldnsd_util.c, to print out the timestamp of a dataset.
In this file, there's no compilation problem (it seems).
But in rbldnsd.c, where struct tm is NOT used (but is
referenced indirectly by sys/select.h &Co), lack of
#include <sys/time.h> makes a problem.

It's a bug to have no #include <sys/time.h> because
sys/select.h requires this header.  But funny enouth,
the problem does not occur on other systems (including
pretty.. interesting ones like OSF/1), and the place
where lack of this #include MAY cause problem is ok.

Having no RH6 handy, I'm awaiting for some more info... ;)
Namely, what's the error message and why it does not
complain about rbldnsd_util.c...

Either way, #include'ing <sys/time.h> needs a (trivial)
test in configure, as on some (?) systems both <time.h>
and <sys/time.h> can't be included (this is standard
autoconf test, I know no details).  It's a trivial enouth
change.

Thank you... again ;)

/mjt


More information about the rbldnsd mailing list