summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPalmer Dabbelt <palmer@dabbelt.com>2015-01-17 16:22:23 -0800
committerPalmer Dabbelt <palmer@dabbelt.com>2015-01-17 16:22:23 -0800
commitba596245f5b606e30c651ffea62d3e5aba2bd84a (patch)
tree94ed9d5705594b28bf758edee5266781e619f0b6 /mail-client/mhng/files/mhng-0.0.2-write_return.patch
parentAdd a GTK2 port of media-sound/pavucontrol at 1.0 and 2.0 (diff)
downloadpalmer-ba596245f5b606e30c651ffea62d3e5aba2bd84a.tar.gz
palmer-ba596245f5b606e30c651ffea62d3e5aba2bd84a.tar.bz2
palmer-ba596245f5b606e30c651ffea62d3e5aba2bd84a.zip
Add mail-client/mhng at 0.0.2
MHng is a rewrite of NMH that's designed to be compatible with the latest mail enviornments (like IMAP and SMTP).
Diffstat (limited to 'mail-client/mhng/files/mhng-0.0.2-write_return.patch')
-rw-r--r--mail-client/mhng/files/mhng-0.0.2-write_return.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/mail-client/mhng/files/mhng-0.0.2-write_return.patch b/mail-client/mhng/files/mhng-0.0.2-write_return.patch
new file mode 100644
index 0000000..9e06ea5
--- /dev/null
+++ b/mail-client/mhng/files/mhng-0.0.2-write_return.patch
@@ -0,0 +1,25 @@
+commit 012e86cc6f1744c6e712737a496abfdb62786433
+Author: Palmer Dabbelt <palmer@dabbelt.com>
+Date: Fri Dec 5 15:45:19 2014 -0800
+
+ Always check write()'s return value
+
+ Even if a write() of 1 can't fail here, I guess I still need to check
+ it...
+
+diff --git a/src/libmhng/mime/part.c++ b/src/libmhng/mime/part.c++
+index 268dfa5..4dfbc45 100644
+--- a/src/libmhng/mime/part.c++
++++ b/src/libmhng/mime/part.c++
+@@ -316,7 +316,10 @@ std::vector<std::string> mime::part::utf8(void) const
+ written += wout;
+ }
+
+- ::write(outfd, "\n", 1);
++ if (::write(outfd, "\n", 1) != 1) {
++ fprintf(stderr, "write of 1 failed\n");
++ abort();
++ }
+ }
+
+ close(outfd);