diff options
| author | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2021-07-28 23:58:55 +0300 |
|---|---|---|
| committer | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2021-07-29 00:02:30 +0300 |
| commit | c8a2151cb9b8035f56d1e3301d9e6b2cf99a146e (patch) | |
| tree | 305e2434545d88ad534ee6c576757ea2c2062cc8 /lib/mu-msg-part.cc | |
| parent | 71b9c7f59874b36b8be3f5cda3ceae527320113d (diff) | |
mu: use g_strerror instead of strerror
Some #includes were missing for the latter (but only noticeable on some
systems - e.g., build breaks on Cygwin).
So let's replace with something that works equally everywhere.
Fixes: #2060
Diffstat (limited to 'lib/mu-msg-part.cc')
| -rw-r--r-- | lib/mu-msg-part.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/mu-msg-part.cc b/lib/mu-msg-part.cc index 4723587..77724a9 100644 --- a/lib/mu-msg-part.cc +++ b/lib/mu-msg-part.cc @@ -739,7 +739,7 @@ write_object_to_fd (GMimeObject *obj, int fd, GError **err) if (write (fd, str, strlen(str)) == -1) { g_set_error (err, MU_ERROR_DOMAIN, MU_ERROR_GMIME, "failed to write object: %s", - strerror(errno)); + g_strerror(errno)); return FALSE; } @@ -768,7 +768,7 @@ save_object (GMimeObject *obj, MuMsgOptions opts, const char *fullpath, if (fd == -1) { g_set_error (err, MU_ERROR_DOMAIN, MU_ERROR_FILE, "could not open '%s' for writing: %s", - fullpath, errno ? strerror(errno) : "error"); + fullpath, errno ? g_strerror(errno) : "error"); return FALSE; } @@ -780,7 +780,7 @@ save_object (GMimeObject *obj, MuMsgOptions opts, const char *fullpath, if (close (fd) != 0 && !err) { /* don't write on top of old err */ g_set_error (err, MU_ERROR_DOMAIN, MU_ERROR_FILE, "could not close '%s': %s", - fullpath, errno ? strerror(errno) : "error"); + fullpath, errno ? g_strerror(errno) : "error"); return FALSE; } |
