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

Pàgina inicial
Delete this message
Reply to this message
Autor: Daphne Tregear
Data:  
A: exim-users
Assumpte: Re: [Exim] Solaris 9 + Sun's own tcpwrapper + exim-3.36 = any joy?
>>>>> "Philip" == Philip Hazel <ph10@???> writes:

    Philip> 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


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


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


    Philip> Maybe something clever like the following change at the
    Philip> 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


    Philip> 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


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


    Philip> Just an idea. Not tested.


And works. Thanks. For the archive I used gcc-3.0, HAVE_IPV6=yes in
Local/Makefile and the mods to smtp_in.c Philip gave above.

Daf