[patch] libextra/fipsmd5.c: dig and mac should be static

Aaron Ucko ucko at ncbi.nlm.nih.gov
Fri Oct 10 22:11:08 CEST 2008


In libextra/fipsmd5.c, dig and mac should be static to avoid name
collisions; in particular, certtool also defines a dig, leading to
errors (at least in --disable-shared configurations).  The following
patches against 2.6.0 and HEAD take care of the matter:

--- gnutls-2.6.0/libextra/fipsmd5.c~	2008-10-05 09:41:43.000000000 -0400
+++ gnutls-2.6.0/libextra/fipsmd5.c	2008-10-10 16:08:11.000000000 -0400
@@ -194,7 +194,7 @@
   gnutls_free (p);
 }
 
-gnutls_crypto_single_digest_st dig =
+static gnutls_crypto_single_digest_st dig =
   {
     md5init,
     NULL,
@@ -204,7 +204,7 @@
     md5deinit
   };
 
-gnutls_crypto_single_mac_st mac =
+static gnutls_crypto_single_mac_st mac =
   {
     hmacmd5init,
     hmacmd5setkey,

--- gnutls-HEAD/libextra/fipsmd5.c~	2008-10-10 16:03:26.000000000 -0400
+++ gnutls-HEAD/libextra/fipsmd5.c	2008-10-10 16:09:11.000000000 -0400
@@ -194,7 +194,7 @@
   gnutls_free (p);
 }
 
-gnutls_crypto_single_digest_st dig = {
+static gnutls_crypto_single_digest_st dig = {
   md5init,
   NULL,
   md5hash,
@@ -203,7 +203,7 @@
   md5deinit
 };
 
-gnutls_crypto_single_mac_st mac = {
+static gnutls_crypto_single_mac_st mac = {
   hmacmd5init,
   hmacmd5setkey,
   hmacmd5hash,

Could you please apply them?

Thanks!

-- 
Aaron Ucko <ucko at ncbi>, NCBI C++ Toolkit core development group





More information about the Gnutls-devel mailing list