Applied with a twist (On VMS, time.h defines select(), according to docs. Why? Beats me) and committed.
Thanks! Cheers, Richard In message <[EMAIL PROTECTED]> on Thu, 29 Mar 2007 11:33:04 +0200, Corinna Vinschen <[EMAIL PROTECTED]> said: vinschen> Hi, vinschen> vinschen> building apps/ocsp.c fails on Cygwin like this: vinschen> vinschen> gcc [...] -c -o ocsp.o ocsp.c vinschen> ocsp.c: In function `query_responder': vinschen> ocsp.c:1262: error: storage size of 'tv' isn't known vinschen> ocsp.c:1290: warning: implicit declaration of function `select' vinschen> ocsp.c:1262: warning: unused variable `tv' vinschen> make[2]: *** [ocsp.o] Error 1 vinschen> vinschen> The reason is that time.h is included instead of sys/time.h. The latter vinschen> is required to get the definition of struct timeval per POSIX (1), and vinschen> it's not required to include sys/time.h from time.h (2). The implicit vinschen> declaration of select is a result of missing the sys/select.h include vinschen> (3). The below patch fixes that. vinschen> vinschen> Index: apps/ocsp.c vinschen> =================================================================== vinschen> RCS file: /home/cvs/cvsroot/src/openssl/apps/ocsp.c,v vinschen> retrieving revision 1.39 vinschen> diff -p -u -r1.39 ocsp.c vinschen> --- apps/ocsp.c 25 Dec 2006 10:54:14 -0000 1.39 vinschen> +++ apps/ocsp.c 29 Mar 2007 09:25:37 -0000 vinschen> @@ -63,7 +63,8 @@ vinschen> declared properly on Compaq platforms vinschen> (at least with DEC C). vinschen> */ vinschen> -#include <time.h> vinschen> +#include <sys/time.h> vinschen> +#include <sys/select.h> vinschen> #include "apps.h" vinschen> #include <openssl/pem.h> vinschen> #include <openssl/ocsp.h> vinschen> vinschen> vinschen> Thanks, vinschen> Corinna vinschen> vinschen> (1) http://www.opengroup.org/onlinepubs/009695399/basedefs/sys/time.h.html vinschen> (2) http://www.opengroup.org/onlinepubs/009695399/basedefs/time.h.html vinschen> (3) http://www.opengroup.org/onlinepubs/009695399/functions/select.html ----- Please consider sponsoring my work on free software. See http://www.free.lp.se/sponsoring.html for details. -- Richard Levitte [EMAIL PROTECTED] http://richard.levitte.org/ "When I became a man I put away childish things, including the fear of childishness and the desire to be very grown up." -- C.S. Lewis ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [email protected] Automated List Manager [EMAIL PROTECTED]
