summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2017-07-05 20:10:56 +0200
committerWerner Koch <wk@gnupg.org>2017-07-05 20:10:56 +0200
commit85a9a913da9ecc6b2cd6f743e90e49983251d706 (patch)
tree0a732a623b5412a2fbd77dc28035077352f85726
parent0d30a4a9791d20c8881b5b12bd44611d9f4274cd (diff)
downloadlibgcrypt-85a9a913da9ecc6b2cd6f743e90e49983251d706.tar.gz
build: Minor API fixes to fix build problems on AIX.
* src/gcrypt.h.in (gcry_error_from_errno): Fix return type. * src/visibility.c (gcry_md_extract): Change return type to match the prototype. -- IBM compiler optimize enums and thus enums may be shorter than an unsigned int. Thus an assert (sizeof (gpg_error_t) == sizeof (gpg_err_code_t) would fail. The deatils seem to depend on the passed compiler options which explains that it has been only reported now. GnuPG-bug-id: 3256 Signed-off-by: Werner Koch <wk@gnupg.org>
-rw-r--r--src/gcrypt.h.in2
-rw-r--r--src/visibility.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/gcrypt.h.in b/src/gcrypt.h.in
index 8d20c83b..9a9acc4b 100644
--- a/src/gcrypt.h.in
+++ b/src/gcrypt.h.in
@@ -189,7 +189,7 @@ int gcry_err_code_to_errno (gcry_err_code_t code);
gcry_error_t gcry_err_make_from_errno (gcry_err_source_t source, int err);
/* Return an error value with the system error ERR. */
-gcry_err_code_t gcry_error_from_errno (int err);
+gcry_error_t gcry_error_from_errno (int err);
/* NOTE: Since Libgcrypt 1.6 the thread callbacks are not anymore
diff --git a/src/visibility.c b/src/visibility.c
index 7bf3d57b..fe46c82a 100644
--- a/src/visibility.c
+++ b/src/visibility.c
@@ -1174,10 +1174,10 @@ gcry_md_read (gcry_md_hd_t hd, int algo)
return _gcry_md_read (hd, algo);
}
-gcry_err_code_t
+gcry_error_t
gcry_md_extract (gcry_md_hd_t hd, int algo, void *buffer, size_t length)
{
- return _gcry_md_extract(hd, algo, buffer, length);
+ return gpg_error (_gcry_md_extract(hd, algo, buffer, length));
}
void