diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2013-09-12 14:09:29 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2013-09-12 14:09:29 +0200 |
| commit | ea1673808584f3c40cc76cc2ea570676309ba5bc (patch) | |
| tree | a300726c4152931064349b46e7401ff80040e4a3 | |
| parent | 8eaa8a3bf048997288633191a278028a65d78ae3 (diff) | |
daemon: Use 'int' instead of the internal 'gcry_md_algo_t' type.
Fixes compilation with the forthcoming libgcrypt 1.6.x.
Reported by Matthias Wachs <wachs@net.in.tum.de>
and NIIBE Yutaka <gniibe@fsij.org>.
* nix/libutil/gcrypt-hash.cc (guix_hash_init, guix_hash_final): Use
'int' as the type of the 'algo' parameter.
* nix/libutil/gcrypt-hash.hh: Update declarations accordingly.
| -rw-r--r-- | nix/libutil/gcrypt-hash.cc | 6 | ||||
| -rw-r--r-- | nix/libutil/gcrypt-hash.hh | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/nix/libutil/gcrypt-hash.cc b/nix/libutil/gcrypt-hash.cc index b364a5747af..553f633b93e 100644 --- a/nix/libutil/gcrypt-hash.cc +++ b/nix/libutil/gcrypt-hash.cc | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* GNU Guix --- Functional package management for GNU | 1 | /* GNU Guix --- Functional package management for GNU |
| 2 | Copyright (C) 2012 Ludovic Courtès <ludo@gnu.org> | 2 | Copyright (C) 2012, 2013 Ludovic Courtès <ludo@gnu.org> |
| 3 | 3 | ||
| 4 | This file is part of GNU Guix. | 4 | This file is part of GNU Guix. |
| 5 | 5 | ||
| @@ -24,7 +24,7 @@ | |||
| 24 | extern "C" { | 24 | extern "C" { |
| 25 | 25 | ||
| 26 | void | 26 | void |
| 27 | guix_hash_init (struct guix_hash_context *ctx, gcry_md_algo_t algo) | 27 | guix_hash_init (struct guix_hash_context *ctx, int algo) |
| 28 | { | 28 | { |
| 29 | gcry_error_t err; | 29 | gcry_error_t err; |
| 30 | 30 | ||
| @@ -40,7 +40,7 @@ guix_hash_update (struct guix_hash_context *ctx, const void *buffer, size_t len) | |||
| 40 | 40 | ||
| 41 | void | 41 | void |
| 42 | guix_hash_final (void *resbuf, struct guix_hash_context *ctx, | 42 | guix_hash_final (void *resbuf, struct guix_hash_context *ctx, |
| 43 | gcry_md_algo_t algo) | 43 | int algo) |
| 44 | { | 44 | { |
| 45 | memcpy (resbuf, gcry_md_read (ctx->md_handle, algo), | 45 | memcpy (resbuf, gcry_md_read (ctx->md_handle, algo), |
| 46 | gcry_md_get_algo_dlen (algo)); | 46 | gcry_md_get_algo_dlen (algo)); |
diff --git a/nix/libutil/gcrypt-hash.hh b/nix/libutil/gcrypt-hash.hh index d2d40d5fb24..d93a6eb881b 100644 --- a/nix/libutil/gcrypt-hash.hh +++ b/nix/libutil/gcrypt-hash.hh | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* GNU Guix --- Functional package management for GNU | 1 | /* GNU Guix --- Functional package management for GNU |
| 2 | Copyright (C) 2012 Ludovic Courtès <ludo@gnu.org> | 2 | Copyright (C) 2012, 2013 Ludovic Courtès <ludo@gnu.org> |
| 3 | 3 | ||
| 4 | This file is part of GNU Guix. | 4 | This file is part of GNU Guix. |
| 5 | 5 | ||
| @@ -30,10 +30,10 @@ struct guix_hash_context | |||
| 30 | gcry_md_hd_t md_handle; | 30 | gcry_md_hd_t md_handle; |
| 31 | }; | 31 | }; |
| 32 | 32 | ||
| 33 | extern void guix_hash_init (struct guix_hash_context *ctx, gcry_md_algo_t algo); | 33 | extern void guix_hash_init (struct guix_hash_context *ctx, int algo); |
| 34 | extern void guix_hash_update (struct guix_hash_context *ctx, const void *buffer, | 34 | extern void guix_hash_update (struct guix_hash_context *ctx, const void *buffer, |
| 35 | size_t len); | 35 | size_t len); |
| 36 | extern void guix_hash_final (void *resbuf, struct guix_hash_context *ctx, | 36 | extern void guix_hash_final (void *resbuf, struct guix_hash_context *ctx, |
| 37 | gcry_md_algo_t algo); | 37 | int algo); |
| 38 | 38 | ||
| 39 | } | 39 | } |
