pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/www/firefox Fix conflicting hmac symbol name with <std...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/9e853f964685
branches:  trunk
changeset: 354429:9e853f964685
user:      kamil <kamil%pkgsrc.org@localhost>
date:      Sun Oct 30 01:06:26 2016 +0000

description:
Fix conflicting hmac symbol name with <stdlib.h> on NetBSD.

This helps webrtc option on NetBSD.

diffstat:

 www/firefox/distinfo                                                      |   4 +-
 www/firefox/patches/patch-netwerk_srtp_src_crypto_hash_hmac.c             |  63 ++++++++++
 www/firefox/patches/patch-netwerk_srtp_src_crypto_kernel_crypto__kernel.c |  24 +++
 3 files changed, 90 insertions(+), 1 deletions(-)

diffs (113 lines):

diff -r 53103257cc22 -r 9e853f964685 www/firefox/distinfo
--- a/www/firefox/distinfo      Sat Oct 29 21:04:13 2016 +0000
+++ b/www/firefox/distinfo      Sun Oct 30 01:06:26 2016 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.255 2016/10/26 20:23:27 ryoon Exp $
+$NetBSD: distinfo,v 1.256 2016/10/30 01:06:26 kamil Exp $
 
 SHA1 (firefox-49.0.2.source.tar.xz) = 52d527f06c522c95e2fcf4008dce1a9913379aaf
 RMD160 (firefox-49.0.2.source.tar.xz) = b0c7bda2f551ea025bb75b0f9a58722f7322ea2d
@@ -80,6 +80,8 @@
 SHA1 (patch-modules_libpref_init_all.js) = 3bc5962fdabb5aecb72ffc7e73bb56392d1ea717
 SHA1 (patch-mozglue_build_arm.cpp) = f41ace63b3f1d2a8ccaffc98c3c64d1e22af5249
 SHA1 (patch-mozglue_build_arm.h) = 5e272f4e19b9681d43a63c45d78b0e44a392c7dc
+SHA1 (patch-netwerk_srtp_src_crypto_hash_hmac.c) = 7f097a1096c91d66fe365c0875e1bb726379d886
+SHA1 (patch-netwerk_srtp_src_crypto_kernel_crypto__kernel.c) = a589bff3b76e79b54f5e617020b137ff3d7f816b
 SHA1 (patch-python_mozbuild_mozbuild_configure_options.py) = f862ee425ae016df6fe12b55050a8dc075ecce89
 SHA1 (patch-rc) = 9628b038f036f3fc0e37bdf84fa0abf99dbc8d2a
 SHA1 (patch-toolkit_components_protobuf_src_google_protobuf_stubs_atomicops.h) = 5ffb0782bbbff2fd17ad71e98b349b4ec3dc6c8c
diff -r 53103257cc22 -r 9e853f964685 www/firefox/patches/patch-netwerk_srtp_src_crypto_hash_hmac.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/firefox/patches/patch-netwerk_srtp_src_crypto_hash_hmac.c     Sun Oct 30 01:06:26 2016 +0000
@@ -0,0 +1,63 @@
+$NetBSD: patch-netwerk_srtp_src_crypto_hash_hmac.c,v 1.1 2016/10/30 01:06:26 kamil Exp $
+
+Fix conflicting hmac symbol name with <stdlib.h> on NetBSD.
+
+--- netwerk/srtp/src/crypto/hash/hmac.c.orig   2016-05-12 17:13:29.000000000 +0000
++++ netwerk/srtp/src/crypto/hash/hmac.c
+@@ -55,7 +55,7 @@ debug_module_t mod_hmac = {
+ 
+ err_status_t
+ hmac_alloc(auth_t **a, int key_len, int out_len) {
+-  extern auth_type_t hmac;
++  extern auth_type_t my_hmac;
+   uint8_t *pointer;
+ 
+   debug_print(mod_hmac, "allocating auth func with key length %d", key_len);
+@@ -79,21 +79,21 @@ hmac_alloc(auth_t **a, int key_len, int 
+ 
+   /* set pointers */
+   *a = (auth_t *)pointer;
+-  (*a)->type = &hmac;
++  (*a)->type = &my_hmac;
+   (*a)->state = pointer + sizeof(auth_t);  
+   (*a)->out_len = out_len;
+   (*a)->key_len = key_len;
+   (*a)->prefix_len = 0;
+ 
+   /* increment global count of all hmac uses */
+-  hmac.ref_count++;
++  my_hmac.ref_count++;
+ 
+   return err_status_ok;
+ }
+ 
+ err_status_t
+ hmac_dealloc(auth_t *a) {
+-  extern auth_type_t hmac;
++  extern auth_type_t my_hmac;
+   
+   /* zeroize entire state*/
+   octet_string_set_to_zero((uint8_t *)a, 
+@@ -103,7 +103,7 @@ hmac_dealloc(auth_t *a) {
+   crypto_free(a);
+   
+   /* decrement global count of all hmac uses */
+-  hmac.ref_count--;
++  my_hmac.ref_count--;
+ 
+   return err_status_ok;
+ }
+@@ -252,7 +252,7 @@ char hmac_description[] = "hmac sha-1 au
+  */
+ 
+ auth_type_t
+-hmac  = {
++ffhmac  = {
+   (auth_alloc_func)      hmac_alloc,
+   (auth_dealloc_func)    hmac_dealloc,
+   (auth_init_func)       hmac_init,
+@@ -265,4 +265,3 @@ hmac  = {
+   (debug_module_t *)    &mod_hmac,
+   (auth_type_id_t)       HMAC_SHA1
+ };
+-
diff -r 53103257cc22 -r 9e853f964685 www/firefox/patches/patch-netwerk_srtp_src_crypto_kernel_crypto__kernel.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/firefox/patches/patch-netwerk_srtp_src_crypto_kernel_crypto__kernel.c Sun Oct 30 01:06:26 2016 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-netwerk_srtp_src_crypto_kernel_crypto__kernel.c,v 1.1 2016/10/30 01:06:26 kamil Exp $
+
+Fix conflicting hmac symbol name with <stdlib.h> on NetBSD.
+
+--- netwerk/srtp/src/crypto/kernel/crypto_kernel.c.orig        2016-05-12 17:13:29.000000000 +0000
++++ netwerk/srtp/src/crypto/kernel/crypto_kernel.c
+@@ -77,7 +77,7 @@ extern cipher_type_t aes_cbc;
+  */
+ 
+ extern auth_type_t null_auth;
+-extern auth_type_t hmac;
++extern auth_type_t ffhmac;
+ 
+ /* crypto_kernel is a global variable, the only one of its datatype */
+ 
+@@ -162,7 +162,7 @@ crypto_kernel_init() {
+   status = crypto_kernel_load_auth_type(&null_auth, NULL_AUTH);
+   if (status)
+     return status;
+-  status = crypto_kernel_load_auth_type(&hmac, HMAC_SHA1);
++  status = crypto_kernel_load_auth_type(&ffhmac, HMAC_SHA1);
+   if (status)
+     return status;
+ 



Home | Main Index | Thread Index | Old Index