summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorenami <enami>2002-05-09 01:40:03 +0000
committerenami <enami>2002-05-09 01:40:03 +0000
commit3841b35a295700b016db60d8522a5574d6a6ecd9 (patch)
tree5c5e1fe1f53ac2cfd35440922b2d7a301311f542
parent74c0cb151b120943fa253ea95e228e836111fd1d (diff)
downloadpkgsrc-3841b35a295700b016db60d8522a5574d6a6ecd9.tar.gz
Test if close(2) is failed after writing to file. This is necssary if
a file is on nfs filesystem.
-rw-r--r--devel/ccache/distinfo3
-rw-r--r--devel/ccache/patches/patch-aa17
2 files changed, 19 insertions, 1 deletions
diff --git a/devel/ccache/distinfo b/devel/ccache/distinfo
index ab85e63eff4..d96a4be273d 100644
--- a/devel/ccache/distinfo
+++ b/devel/ccache/distinfo
@@ -1,4 +1,5 @@
-$NetBSD: distinfo,v 1.2 2002/05/07 05:22:50 tron Exp $
+$NetBSD: distinfo,v 1.3 2002/05/09 01:40:03 enami Exp $
SHA1 (ccache-1.8.tar.gz) = 54a65bca01549aeeb1320db73f2f0803f3df6db5
Size (ccache-1.8.tar.gz) = 62148 bytes
+SHA1 (patch-aa) = caafca94d1e2a9a86a8d66959d3a23083e2c0a40
diff --git a/devel/ccache/patches/patch-aa b/devel/ccache/patches/patch-aa
new file mode 100644
index 00000000000..f4413130b5a
--- /dev/null
+++ b/devel/ccache/patches/patch-aa
@@ -0,0 +1,17 @@
+$NetBSD: patch-aa,v 1.1 2002/05/09 01:40:04 enami Exp $
+
+--- util.c.orig Sat Apr 6 22:48:03 2002
++++ util.c
+@@ -83,8 +83,11 @@
+ }
+ }
+
+- close(fd2);
+ close(fd1);
++ if (close(fd2) == -1) {
++ unlink(dest);
++ return -1;
++ }
+ return 0;
+ }
+