summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2012-02-23 19:22:28 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2012-02-23 19:22:28 +0100
commitb210e7e09f82b1089d17289b0ae54095bd2218ba (patch)
treedcfd5c3de5efe26c9ca616b4b41d028bb8304e3b /lib
parent83d2e762d0ea97e7a0785495fe8de3cb22634bc2 (diff)
downloadgnutls-b210e7e09f82b1089d17289b0ae54095bd2218ba.tar.gz
compilation fixes.
Diffstat (limited to 'lib')
-rw-r--r--lib/accelerated/cryptodev-gcm.c11
-rw-r--r--lib/accelerated/cryptodev.c14
-rw-r--r--lib/accelerated/cryptodev.h8
3 files changed, 21 insertions, 12 deletions
diff --git a/lib/accelerated/cryptodev-gcm.c b/lib/accelerated/cryptodev-gcm.c
index 1f5bea6b19..1c59156206 100644
--- a/lib/accelerated/cryptodev-gcm.c
+++ b/lib/accelerated/cryptodev-gcm.c
@@ -24,13 +24,22 @@
#include <gnutls_int.h>
#include <gnutls/crypto.h>
#include <gnutls_errors.h>
+#include <accelerated/cryptodev.h>
#ifdef ENABLE_CRYPTODEV
#include <fcntl.h>
#include <sys/ioctl.h>
#include <crypto/cryptodev.h>
-#include <accelerated/cryptodev.h>
+
+#ifndef CRYPTO_CIPHER_MAX_KEY_LEN
+#define CRYPTO_CIPHER_MAX_KEY_LEN 64
+#endif
+
+#ifndef EALG_MAX_BLOCK_LEN
+#define EALG_MAX_BLOCK_LEN 16
+#endif
+
#ifdef CIOCAUTHCRYPT
diff --git a/lib/accelerated/cryptodev.c b/lib/accelerated/cryptodev.c
index d0d5cfc8ba..3170d42a3e 100644
--- a/lib/accelerated/cryptodev.c
+++ b/lib/accelerated/cryptodev.c
@@ -24,13 +24,21 @@
#include <gnutls_int.h>
#include <gnutls/crypto.h>
#include <gnutls_errors.h>
+#include <accelerated/cryptodev.h>
#ifdef ENABLE_CRYPTODEV
#include <fcntl.h>
#include <sys/ioctl.h>
#include <crypto/cryptodev.h>
-#include <accelerated/cryptodev.h>
+
+#ifndef CRYPTO_CIPHER_MAX_KEY_LEN
+#define CRYPTO_CIPHER_MAX_KEY_LEN 64
+#endif
+
+#ifndef EALG_MAX_BLOCK_LEN
+#define EALG_MAX_BLOCK_LEN 16
+#endif
int _gnutls_cryptodev_fd = -1;
@@ -621,13 +629,13 @@ register_mac_digest (int cfd)
#else /* ENABLE_CRYPTODEV */
int
-_gnutls_cryptodev_init ()
+_gnutls_cryptodev_init (void)
{
return 0;
}
void
-_gnutls_cryptodev_deinit ()
+_gnutls_cryptodev_deinit (void)
{
return;
}
diff --git a/lib/accelerated/cryptodev.h b/lib/accelerated/cryptodev.h
index f531be064c..a430bddf0e 100644
--- a/lib/accelerated/cryptodev.h
+++ b/lib/accelerated/cryptodev.h
@@ -1,13 +1,5 @@
extern int _gnutls_cryptodev_fd;
-#ifndef CRYPTO_CIPHER_MAX_KEY_LEN
-#define CRYPTO_CIPHER_MAX_KEY_LEN 64
-#endif
-
-#ifndef EALG_MAX_BLOCK_LEN
-#define EALG_MAX_BLOCK_LEN 16
-#endif
-
void _gnutls_cryptodev_deinit (void);
int _gnutls_cryptodev_init (void);
int _cryptodev_register_gcm_crypto (int cfd);