seamonkey: handle conflicting declaration for hmac on netbsd
patches taken from www/firefox. NFC
This commit is contained in:
parent
f78b446a4f
commit
982d8e96ed
3 changed files with 85 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: distinfo,v 1.146 2017/11/10 22:45:27 ryoon Exp $
|
||||
$NetBSD: distinfo,v 1.147 2017/12/15 23:50:55 maya Exp $
|
||||
|
||||
SHA1 (seamonkey-2.49.1.source.tar.xz) = 6ef366a03ef31b8c0bfb7a1fd908bf5feed1be79
|
||||
RMD160 (seamonkey-2.49.1.source.tar.xz) = 4529cd5ce107af03e496cb8353d2045109b53635
|
||||
|
@ -114,5 +114,7 @@ SHA1 (patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcstubs__arm__netbsd.cpp) =
|
|||
SHA1 (patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcstubs__asm__mips.S) = 40231c0cbd4694f375211c21fe0473fd5fb9f483
|
||||
SHA1 (patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcstubs__asm__sparc64__netbsd.s) = 219bdb7ef05d156642dd4124e444696c744badfd
|
||||
SHA1 (patch-mozilla_xpcom_reflect_xptcall_md_unix_xptcstubs__netbsd__m68k.cpp) = 09b4833061face404731f2ec99a7fd2b3f313f70
|
||||
SHA1 (patch-netwerk_srtp_src_crypto_hash_hmac.c) = f1c41712212182af22403f32a4153b6542aa14b1
|
||||
SHA1 (patch-netwerk_srtp_src_crypto_kernel_crypto__kernel.c) = 439709724e30ef5b4e671fb4b525dca804f9597c
|
||||
SHA1 (patch-rc) = bf98fe87c83c322dcdfe3d7aff3ca8e6f273a567
|
||||
SHA1 (patch-suite_installer_Makefile.in) = 3403f4229f62ad09b379ac6d54328e33c039506c
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
$NetBSD: patch-netwerk_srtp_src_crypto_hash_hmac.c,v 1.1 2017/12/15 23:50:55 maya Exp $
|
||||
|
||||
Avoid conflict with netbsd's stdlib.h hmac.
|
||||
|
||||
--- mozilla/netwerk/srtp/src/crypto/hash/hmac.c.orig 2017-06-15 20:52:29.000000000 +0000
|
||||
+++ mozilla/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 hmac_auth;
|
||||
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 = &hmac_auth;
|
||||
(*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++;
|
||||
+ hmac_auth.ref_count++;
|
||||
|
||||
return err_status_ok;
|
||||
}
|
||||
|
||||
err_status_t
|
||||
hmac_dealloc(auth_t *a) {
|
||||
- extern auth_type_t hmac;
|
||||
+ extern auth_type_t hmac_auth;
|
||||
|
||||
/* 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--;
|
||||
+ hmac_auth.ref_count--;
|
||||
|
||||
return err_status_ok;
|
||||
}
|
||||
@@ -252,7 +252,7 @@ char hmac_description[] = "hmac sha-1 au
|
||||
*/
|
||||
|
||||
auth_type_t
|
||||
-hmac = {
|
||||
+hmac_auth = {
|
||||
(auth_alloc_func) hmac_alloc,
|
||||
(auth_dealloc_func) hmac_dealloc,
|
||||
(auth_init_func) hmac_init,
|
|
@ -0,0 +1,24 @@
|
|||
$NetBSD: patch-netwerk_srtp_src_crypto_kernel_crypto__kernel.c,v 1.1 2017/12/15 23:50:55 maya Exp $
|
||||
|
||||
Avoid conflict with netbsd's stdlib.h hmac.
|
||||
|
||||
--- mozilla/netwerk/srtp/src/crypto/kernel/crypto_kernel.c.orig 2017-06-15 20:52:29.000000000 +0000
|
||||
+++ mozilla/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 hmac_auth;
|
||||
|
||||
/* 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(&hmac_auth, HMAC_SHA1);
|
||||
if (status)
|
||||
return status;
|
||||
|
Loading…
Reference in a new issue