summaryrefslogtreecommitdiffstats
path: root/development/gcc5/fastjar-patches/1001-fastjar-0.97-len1.patch
diff options
context:
space:
mode:
author Matteo Bernardini2019-12-31 15:55:40 +0100
committer Matteo Bernardini2019-12-31 15:55:40 +0100
commit30778e822d6ef153cd8936acaa45deeeb8f5374a (patch)
tree9605719730f63b62fb4e9c22167b36c60ceb950f /development/gcc5/fastjar-patches/1001-fastjar-0.97-len1.patch
parent82bbd880da5d554ddb98a82fcf8c17cc2131d56a (diff)
downloadslackbuilds-09a5bf3404bab1e2761ed811c0f3c63e2bc4573c.tar.gz
20191231.1 global branch merge.current-20191231.1
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'development/gcc5/fastjar-patches/1001-fastjar-0.97-len1.patch')
-rw-r--r--development/gcc5/fastjar-patches/1001-fastjar-0.97-len1.patch16
1 files changed, 16 insertions, 0 deletions
diff --git a/development/gcc5/fastjar-patches/1001-fastjar-0.97-len1.patch b/development/gcc5/fastjar-patches/1001-fastjar-0.97-len1.patch
new file mode 100644
index 0000000000..722351d334
--- /dev/null
+++ b/development/gcc5/fastjar-patches/1001-fastjar-0.97-len1.patch
@@ -0,0 +1,16 @@
+2009-12-21 Chris Ball <cjb@laptop.org>
+
+ * jartool.c (add_file_to_jar): Test write return value against -1
+ instead of 1.
+
+--- fastjar-0.97/jartool.c.jj 2008-10-15 12:35:37.000000000 -0400
++++ fastjar-0.97/jartool.c 2009-12-22 06:48:09.309530000 -0500
+@@ -1257,7 +1257,7 @@ int add_file_to_jar(int jfd, int ffd, co
+ exit_on_error("write");
+
+ /* write the file name to the zip file */
+- if (1 == write(jfd, fname, file_name_length))
++ if (-1 == write(jfd, fname, file_name_length))
+ exit_on_error("write");
+
+ if(verbose){