git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: "Carlo Marcelo Arenas Belón" <carenas@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH v2] builtin/receive-pack: avoid generic function name hmac()
Date: Tue, 5 May 2020 11:48:37 +0000	[thread overview]
Message-ID: <20200505114837.GG6530@camp.crustytoothpaste.net> (raw)
In-Reply-To: <20200505095326.36374-1-carenas@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1205 bytes --]

On 2020-05-05 at 09:53:26, Carlo Marcelo Arenas Belón wrote:
> fabec2c5c3 (builtin/receive-pack: switch to use the_hash_algo, 2019-08-18)
> renames hmac_sha1 to hmac, as it was updated to use the hash function used
> by git (which won't be sha1 in the future).
> 
> hmac() is provided by NetBSD >= 8 libc and therefore conflicts as shown by :
> 
> builtin/receive-pack.c:421:13: error: conflicting types for 'hmac'
>  static void hmac(unsigned char *out,
>              ^~~~
> In file included from ./git-compat-util.h:172:0,
>                  from ./builtin.h:4,
>                  from builtin/receive-pack.c:1:
> /usr/include/stdlib.h:305:10: note: previous declaration of 'hmac' was here
>  ssize_t  hmac(const char *, const void *, size_t, const void *, size_t, void *,
>           ^~~~
> 
> Rename it again to hmac_hash to reflect it will use the git's defined hash
> function and avoid the conflict, while at it update a comment to better
> describe the HMAC function that was used.
> 
> Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>

Looks good.  Thanks again for the patch.
-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

      reply	other threads:[~2020-05-05 11:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-05  5:46 [PATCH] builtin/receive-pack: avoid generic function name hmac Carlo Marcelo Arenas Belón
2020-05-05  5:52 ` Eric Sunshine
2020-05-05  6:37 ` Junio C Hamano
2020-05-05  7:18   ` Carlo Marcelo Arenas Belón
2020-05-05  9:24 ` brian m. carlson
2020-05-05 10:12   ` Carlo Marcelo Arenas Belón
2020-05-05  9:53 ` [PATCH v2] builtin/receive-pack: avoid generic function name hmac() Carlo Marcelo Arenas Belón
2020-05-05 11:48   ` brian m. carlson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200505114837.GG6530@camp.crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=carenas@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).