gnutls 3.0.4 and mingw-w64 build issues

Simon Josefsson simon at
Fri Oct 21 13:26:08 CEST 2011

"Hoyt, David" <hoyt6 at> writes:

> When building 3.0.4 with mingw-w64 (gcc 4.5.2) on a windows 7 machine,
> I get the following error:
> In file included from gnutls-3.0.4/lib/x509/common.c:24:0:
> gnutls-3.0.4/lib/x509/../gnutls_int.h:46:24: fatal error:
> sys/socket.h: No such file or directory
> compilation terminated. 
> I double checked and I do not have sys/socket.h. What's the correct
> fix for gnutls_int.h?

You should have a sys/socket.h in the GnuTLS build tree somewhere, from
gnulib.  Some -I's are missing, I've pushed this patch:

> Removing the include altogether allowed compilation to proceed further
> (so perhaps the include could be guarded if needed elsewhere), but
> then I got:
> In file included from gnutls-3.0.4/lib/accelerated/x86/sha-padlock.c:24:0:
> gnutls-3.0.4/lib/accelerated/x86/../../gnutls_int.h:65:27: fatal
> error: gnutls/gnutls.h: No such file or directory
> compilation terminated.
> make[4]: *** [sha-padlock.lo] Error 1

Similar issue, I've added:

Please try building from git, or try next release.


More information about the Gnutls-help mailing list