diff options
author | kamil <kamil@pkgsrc.org> | 2016-10-30 01:06:26 +0000 |
---|---|---|
committer | kamil <kamil@pkgsrc.org> | 2016-10-30 01:06:26 +0000 |
commit | a89981e3ecca16b66f120aca1ea0495512213fe4 (patch) | |
tree | 16aa19a46318ea7ad68c64eeb9b076a35374ac82 /www | |
parent | 037bf7e771692496ce1793925c9efe952ebb02d8 (diff) | |
download | pkgsrc-a89981e3ecca16b66f120aca1ea0495512213fe4.tar.gz |
Fix conflicting hmac symbol name with <stdlib.h> on NetBSD.
This helps webrtc option on NetBSD.
Diffstat (limited to 'www')
-rw-r--r-- | www/firefox/distinfo | 4 | ||||
-rw-r--r-- | www/firefox/patches/patch-netwerk_srtp_src_crypto_hash_hmac.c | 63 | ||||
-rw-r--r-- | www/firefox/patches/patch-netwerk_srtp_src_crypto_kernel_crypto__kernel.c | 24 |
3 files changed, 90 insertions, 1 deletions
diff --git a/www/firefox/distinfo b/www/firefox/distinfo index 53415af8bae..98a3689fc15 100644 --- a/www/firefox/distinfo +++ b/www/firefox/distinfo @@ -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_libjar_nsZipArchive.cpp) = 133b1658839d9b0f932a601670862c1f4 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 --git a/www/firefox/patches/patch-netwerk_srtp_src_crypto_hash_hmac.c b/www/firefox/patches/patch-netwerk_srtp_src_crypto_hash_hmac.c new file mode 100644 index 00000000000..14b38dcdba5 --- /dev/null +++ b/www/firefox/patches/patch-netwerk_srtp_src_crypto_hash_hmac.c @@ -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 --git a/www/firefox/patches/patch-netwerk_srtp_src_crypto_kernel_crypto__kernel.c b/www/firefox/patches/patch-netwerk_srtp_src_crypto_kernel_crypto__kernel.c new file mode 100644 index 00000000000..b674527dc32 --- /dev/null +++ b/www/firefox/patches/patch-netwerk_srtp_src_crypto_kernel_crypto__kernel.c @@ -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; + |