aboutsummaryrefslogtreecommitdiffstats
path: root/src/strerror.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/strerror.c')
-rw-r--r--src/strerror.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/strerror.c b/src/strerror.c
index f0fb9e9..3e627b1 100644
--- a/src/strerror.c
+++ b/src/strerror.c
@@ -33,5 +33,14 @@ const char *
gpg_strerror (gpg_error_t err)
{
gpg_err_code_t code = gpg_err_code (err);
+
+ if (code & GPG_ERR_SYSTEM_ERROR)
+ {
+ int no = gpg_err_code_to_errno (err);
+ if (no)
+ return strerror (no);
+ else
+ code = GPG_ERR_UNKNOWN_ERRNO;
+ }
return dgettext (PACKAGE, msgstr + msgidx[msgidxof (code)]);
}