[gnutls-help] Compiling gnutls on solaris

Nikos Mavrogiannopoulos nmav at gnutls.org
Tue Sep 30 21:15:33 CEST 2014


On Tue, 2014-09-30 at 14:04 -0400, dev wrote:

> > > OKay, this looks familiar and I remember running into this last time
> > > I
> > > tried a build of gnutls and I think I recall the solution was we
> > > need
> > > -lsocket -lnsl on Solaris because the socket funcs inet_ntop,
> > > inet_ntoa
> [...]
> I have made no progress on that yet. There is someplace in that Makefile
> within the ./lib directory that needs -lnsl and -lsocket but I can not
> seem to find where. Any hints ?

gnulib may have done some discovery of them. Do any of the variables in
config.log contains -lsocket -lnsl? If yes we could reuse it. I'd have
expected LIBSOCKET to contain that.

> Also, unrelated, but annoying little type mismatch warnings from two
> source
> files are easily fixed with a simple cast thus :
> Warning :
>   CC       x509.lo
> "x509.c", line 2954: warning: argument #3 is incompatible with
> prototype:
>         prototype: pointer to unsigned int :
> "./../includes/gnutls/x509-ext.h", line 64
>         argument : pointer to enum gnutls_x509_subject_alt_name_t
> {GNUTLS_SAN_OTHERNAME_XMPP(1000), GNUTLS_SAN_DN(6),
> GNUTLS_SAN_OTHERNAME(5), GNUTLS_SAN_IPADDRESS(4), GNUTLS_SAN_URI(3),
> GNUTLS_SAN_RFC822NAME(2), GNUTLS_SAN_DNSNAME(1)}

I don't see why that warning is there. The prototype I have has
"unsigned int", and in the code "type" is defined as unsigned. Is that
from gnutls master? Could you quote the function and the prototype you
have?

> Warnings :
> Trivial fixes :
> $ diff -cu ./lib/opencdk/stream.c_ ./lib/opencdk/stream.c
> --- ./lib/opencdk/stream.c_     Tue Jul 29 20:22:47 2014
> +++ ./lib/opencdk/stream.c      Tue Sep 30 11:10:55 2014
> @@ -1116,7 +1116,7 @@
>                 gnutls_assert();
>                 return CDK_Inv_Value;
>         }
> -       f = filter_add(s, _cdk_filter_armor, fARMOR);
> +       f = filter_add(s, (filter_fnct_t) _cdk_filter_armor, fARMOR);

Thanks. I've fixed the prototype instead. Casting functions is pretty
dangerous.

regards,
Nikos





More information about the Gnutls-help mailing list