Re: [Exim] Solaris 9 + Sun's own tcpwrapper + exim-3.36 = an…

Etusivu
Poista viesti
Vastaa
Lähettäjä: Philip Hazel
Päiväys:  
Vastaanottaja: Daphne Tregear
Kopio: exim-users
Aihe: Re: [Exim] Solaris 9 + Sun's own tcpwrapper + exim-3.36 = any joy?
On Tue, 3 Sep 2002, Daphne Tregear wrote:

> Has anyone else found a way round this when building exim-3.36 on a
> 64-bit sparc running Solaris 9 using the tcp wrappers in /usr/sfw?
>
> /opt/SUNWspro/bin/cc -c -O -I/usr/sfw/include    -I. smtp_in.c
> "/usr/sfw/include/tcpd.h", line 12: warning: macro redefined: HAVE_IPV6


Sigh. Whenever one choses a nice name for something, somebody else has
the same idea. Exim uses HAVE_IPV6; it looks as though
/usr/sfw/include/tcpd.h does too.

From what you said in the other message, this is causing the other
problems.

The only way out is to change the name, either in Exim, or in
tcpwrappers so that they don't conflict.

Maybe something clever like the following change at the top of smtp_in.c
would work. At present, it says

/* Initialize for TCP wrappers if so configured */

#ifdef USE_TCP_WRAPPERS
#include <tcpd.h>
int allow_severity = LOG_INFO;
int deny_severity = LOG_NOTICE;
#endif


Try changing it to

/* Initialize for TCP wrappers if so configured */

#ifdef USE_TCP_WRAPPERS
#if HAVE_IPV6
#define EXIM_HAVE_IPV6
#endif
#undef HAVE_IPV6
#include <tcpd.h>
#ifdef EXIM_HAVE_IPV6
#define HAVE_IPV6 TRUE
#endif
int allow_severity = LOG_INFO;
int deny_severity = LOG_NOTICE;
#endif


In other words, undefine HAVE_IPV6 while including tcpd.h so that it can
have its wicked way with it, and then re-instate it afterwards.

Just an idea. Not tested.


--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.