<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7036.0">
<TITLE>Error building extras/contrib libgcrypt on Cygwin</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT FACE="Times New Roman">Looks like someone has done what's needed so that XML builds OK now, but libgcrypt still bugs out on Cygwin.</FONT>

<BR><FONT FACE="Times New Roman">random.c:46:23: sys/times.h: No such file or directory</FONT>

<BR><FONT FACE="Times New Roman">random.c: In function `getfnc_fast_random_poll':</FONT>

<BR><FONT FACE="Times New Roman">random.c:925: warning: return from incompatible pointer type</FONT>

<BR><FONT FACE="Times New Roman">make[4]: *** [random.lo] Error 1</FONT>

<BR><FONT FACE="Times New Roman">make[4]: Leaving directory `/home/mfm/vlc-trunk/extras/contrib/src/libgcrypt/cip</FONT>

<BR><FONT FACE="Times New Roman">her'</FONT>

<BR><FONT FACE="Times New Roman">make[3]: *** [all-recursive] Error 1</FONT>

<BR><FONT FACE="Times New Roman">make[3]: Leaving directory `/home/mfm/vlc-trunk/extras/contrib/src/libgcrypt'</FONT>

<BR><FONT FACE="Times New Roman">make[2]: *** [all] Error 2</FONT>

<BR><FONT FACE="Times New Roman">make[2]: Leaving directory `/home/mfm/vlc-trunk/extras/contrib/src/libgcrypt'</FONT>

<BR><FONT FACE="Times New Roman">make[1]: *** [.gcrypt] Error 2</FONT>

<BR><FONT FACE="Times New Roman">make[1]: Leaving directory `/home/mfm/vlc-trunk/extras/contrib/src'</FONT>

<BR><FONT FACE="Times New Roman">make: *** [src] Error 2</FONT>
</P>
<BR>

<P><FONT FACE="Times New Roman">The following is from an e-mail I sent on 13 Sept, still valid.  If using MinGW we need to have #undef HAVE_GETTIMEOFDAY, either put in config.h or someplace like line 42 of random.c.  I don't know how to use the patch tool, so can't submit an update, I can just say what needs to occur (a patch that, if it's MinGW, does the #undef)</FONT></P>

<P><FONT SIZE=2 FACE="Courier New">I ran into this on the Web:</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Courier New">"Solution: Make it explict with #UNDEF HAVE_TIMES in<BR>
$objdir\i686-pc-mingw32\libiberty\config.h, because it doesn't exist on<BR>
MinGW."</FONT><FONT FACE="Times New Roman"> </FONT>

<BR><FONT SIZE=2 FACE="Courier New">The above was for another app that was generating the same error as I ran into with the VLC extras/contrib/libgcrypt make.</FONT></P>

<P><FONT SIZE=2 FACE="Courier New">I ended up adding #undef HAVE_GETTIMEOFDAY</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT SIZE=2 FACE="Courier New">To my libgcrypt config.h, and it now compiles (apparently something awry in the Cygwin distribution)</FONT><FONT FACE="Times New Roman"> </FONT>

<BR><FONT SIZE=2 FACE="Courier New">Can something be added to the patches for extras/contrib, that will sense if it's mingw, and if so do the undef in the config.h generated for libgcrypt, else in random.c, at line 42 toss in a similar exlusion (so you don't invoke sys/times.h)?</FONT><FONT FACE="Times New Roman"> </FONT></P>

<P><FONT FACE="Times New Roman">Thanks.</FONT>
</P>

<P><FONT FACE="Times New Roman">Mark</FONT>
</P>

</BODY>
</HTML>