gcrypt.h need to include sys/time.h for timeval
Simon Josefsson
jas at extundo.com
Tue Aug 10 18:22:33 CEST 2004
Hello. This patch is to avoid warnings like the following:
/tmp/jas4711/include/gcrypt.h:174: warning: `struct timeval' declared inside parameter list
/tmp/jas4711/include/gcrypt.h:174: warning: its scope is only this definition or declaration, which is probably not what you want.
which can be quite annoying if repeated many times.
POSIX require sys/time.h (or sys/select.h) to define timeval, so the
patch should be sufficient:
http://www.opengroup.org/onlinepubs/009695399/basedefs/sys/time.h.html
Thanks,
Simon
Index: gcrypt.h
===================================================================
RCS file: /cvs/gnupg/libgcrypt/src/gcrypt.h,v
retrieving revision 1.125
diff -u -p -u -w -r1.125 gcrypt.h
--- gcrypt.h 15 Apr 2004 09:00:22 -0000 1.125
+++ gcrypt.h 10 Aug 2004 16:16:29 -0000
@@ -29,6 +29,7 @@
#include <sys/types.h>
#include <sys/socket.h>
+#include <sys/time.h>
/* This is required for error code compatibility. */
#define _GCRY_ERR_SOURCE_DEFAULT GPG_ERR_SOURCE_GCRYPT
More information about the Gcrypt-devel
mailing list