> From [EMAIL PROTECTED] Sat Apr  6 04:29:46 2002
> From: Dr Andreas F Muller <[EMAIL PROTECTED]>
> Date: Sat,  6 Apr 2002 13:33:30 +0200
> To: [EMAIL PROTECTED]
> Subject: LPRng: patch for 3.8.10 to compile on Solaris 2.6
>
> Hello,
>
> I've tried to install LPRng 3.8.10 on a  Solaris  2.6  (I  should
> really  have  upgraded, I admit), and the -Werror flag caused the
> compile to  break.  The  reason  was  a  signedness  mismatch  in
> src/common/linksupport.c:1465  caused  by  the INADDR_NONE macro.
> The latter is set to (-1), while in_addr_t, then return  type  of
> inet_addr, is really an alias for unsigned int.  Thus the follow-
> ing patch fixes the problem:
>
> --- LPRng-3.8.10/src/common/linksupport.c       Mon Apr  1 19:54:51 2002
> +++ LPRng-3.8.10-patched/src/common/linksupport.c       Sat Apr  6 12:55:14 2002
> @@ -1462,7 +1462,7 @@
>  #if !defined(INADDR_NONE)
>  #define INADDR_NONE (-1)
>  #endif
> -       if( inet_addr( strptr ) != INADDR_NONE ){
> +       if( inet_addr( strptr ) != (in_addr_t)INADDR_NONE ){
>                 ((unsigned long *)addr)[0] = inet_addr( strptr );
>                 return(1);
>         }
>
> Mit herzlichem Gruss

A slightly better way is:

    if( (unsigned long)inet_addr( strptr ) != (unsigned long)INADDR_NONE ){

-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address

If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:                           | example:
subscribe LIST <mailaddr>       |  subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr>     |  unsubscribe lprng [EMAIL PROTECTED]

If you have major problems,  send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------

Reply via email to