Re: protocol.c:217: error: `PF_UNSPEC' undeclared (first use in this function)

Brian Stafford <[email protected]> Wed, 07 Apr 2004 15:48:52 +0000
Newsgroups gmane.comp.lib.libesmtp
Message-ID <[email protected]>
On 2004.04.07 16:35, Gansser, Martin wrote:
> Hi,
> 
>  i tried to compile libesmtp-1.0 on hpux 11.00 with gnome-2.4, but   
> this  fails  with the following error message:

That's an old version. 1.0.2 is current. Using this might get better  
results.

> 
> /usr/local/include/openssl/ssl.h:1320: warning: function declaration
> isn't a prototype
> /usr/local/include/openssl/ssl.h:1322: warning: function declaration
> isn't a prototype

Hmmm...this looks like an OpenSSL problem. Not sure if current libESMTP  
will cure this one.

> protocol.c: In function `do_session':
> protocol.c:155: warning: implicit declaration of function `strdup'
> protocol.c:155: warning: assignment makes pointer from integer  
> without
> a cast
> protocol.c:217: error: `PF_UNSPEC' undeclared (first use in this
> function)
> protocol.c:217: error: (Each undeclared identifier is reported only
> once
> protocol.c:217: error: for each function it appears in.)
> protocol.c:218: error: `SOCK_STREAM' undeclared (first use in this
> function)
> protocol.c:230: warning: implicit declaration of function `socket'
> protocol.c:236: warning: implicit declaration of function `connect'
> protocol.c: In function `cb_ehlo':
> protocol.c:727: warning: implicit declaration of function  
> `strcasecmp'
> protocol.c:739: warning: implicit declaration of function
> `strncasecmp'

Sounds like some strict iso C checking has #ifdefd out parts of some  
standard headers.  Try configuring libESMTP with
 --enable-more-warnings=no

I don't reccommend use of non-current libESMTP for many reasons

Brian