Hi,
building apps/ocsp.c fails on Cygwin like this:
gcc [...] -c -o ocsp.o ocsp.c
ocsp.c: In function `query_responder':
ocsp.c:1262: error: storage size of 'tv' isn't known
ocsp.c:1290: warning: implicit declaration of function `select'
ocsp.c:1262: warning: unused variable `tv'
make[2]: *** [ocsp.o] Error 1
The reason is that time.h is included instead of sys/time.h. The latter
is required to get the definition of struct timeval per POSIX (1), and
it's not required to include sys/time.h from time.h (2). The implicit
declaration of select is a result of missing the sys/select.h include
(3). The below patch fixes that.
Index: apps/ocsp.c
===================================================================
RCS file: /home/cvs/cvsroot/src/openssl/apps/ocsp.c,v
retrieving revision 1.39
diff -p -u -r1.39 ocsp.c
--- apps/ocsp.c 25 Dec 2006 10:54:14 -0000 1.39
+++ apps/ocsp.c 29 Mar 2007 09:25:37 -0000
@@ -63,7 +63,8 @@
declared properly on Compaq platforms
(at least with DEC C).
*/
-#include <time.h>
+#include <sys/time.h>
+#include <sys/select.h>
#include "apps.h"
#include <openssl/pem.h>
#include <openssl/ocsp.h>
Thanks,
Corinna
(1) http://www.opengroup.org/onlinepubs/009695399/basedefs/sys/time.h.html
(2) http://www.opengroup.org/onlinepubs/009695399/basedefs/time.h.html
(3) http://www.opengroup.org/onlinepubs/009695399/functions/select.html
--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [email protected]
Automated List Manager [EMAIL PROTECTED]