Re: [Exim] Exim 4.30 on IRIX 6.5.19m: conflicting types for …

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Derrick
Datum:  
To: exim-users, Bernhard Erdmann
Betreff: Re: [Exim] Exim 4.30 on IRIX 6.5.19m: conflicting types for `inet_ntoa'
I commented out that code from the exim source and it compiled fine after
that, I don't know if it's a good fix, but it worked.

On Mon, 22 Dec 2003, Bernhard Erdmann wrote:

> Hi,
>
> compiling Exim 4.30 on IRIX 6.5.19m using gcc 3.3 (SGI Freeware) I get
> an error message:
>
>
> [...]
> gcc -c -O2 -DUSE_INET_NTOA_FIX -I.    header.c
> gcc -c -O2 -DUSE_INET_NTOA_FIX -I.    host.c
> host.c:46: error: conflicting types for `inet_ntoa'
> /usr/include/arpa/inet.h:74: error: previous declaration of `inet_ntoa'
> gmake[1]: *** [host.o] Error 1
> gmake[1]: Leaving directory `/usr/local/src/exim-4.30/build-IRIX6-mips'
> gmake: *** [go] Error 2

>
>
> How to work around?
>
>
> src/host.c reads:
>
>
> #ifdef USE_INET_NTOA_FIX
> /*************************************************
> *         Replacement for broken inet_ntoa()     *
> *************************************************/

>
> /* On IRIX systems, gcc uses a different structure passing convention to the
> native libraries. This causes inet_ntoa() to always yield 0.0.0.0 or
> 255.255.255.255. To get round this, we provide a private version of the
> function here. It is used only if USE_INET_NTOA_FIX is set, which should
> happen
> only when gcc is in use on an IRIX system. Code send to me by J.T. Breitner,
> with these comments:
>
>    code by Stuart Levy
>    as seen in comp.sys.sgi.admin

>
> Arguments:  sa  an in_addr structure
> Returns:        pointer to static text string
> */

>
> uschar *
> inet_ntoa(struct in_addr sa)
> {
> static uschar addr[20];
> sprintf(addr, "%d.%d.%d.%d",
>          (US &sa.s_addr)[0],
>          (US &sa.s_addr)[1],
>          (US &sa.s_addr)[2],
>          (US &sa.s_addr)[3]);
>    return addr;
> }
> #endif

>
>
>
> --
>
> ## List details at http://www.exim.org/mailman/listinfo/exim-users Exim details at http://www.exim.org/ ##
>
>



Derrick MacPherson
derrick@???