summaryrefslogtreecommitdiff
path: root/openbsd-compat/xmmap.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2009-02-16 15:21:39 +1100
committerDamien Miller <djm@mindrot.org>2009-02-16 15:21:39 +1100
commit3f94aaf38c815f0aa72c3c7bf40491c8d456e929 (patch)
treecbed0240d51a5217b546279dc7b7bc1b34d0c6cc /openbsd-compat/xmmap.c
parent6385e758dfbc72d461a68cd19819e5f9d41e555c (diff)
- (djm) [regress/conch-ciphers.sh regress/putty-ciphers.sh]
[regress/putty-kex.sh regress/putty-transfer.sh] Downgrade disabled interop tests from FATAL error to a warning. Allows some interop tests to proceed if others are missing necessary prerequisites.
Diffstat (limited to 'openbsd-compat/xmmap.c')
-rw-r--r--openbsd-compat/xmmap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/openbsd-compat/xmmap.c b/openbsd-compat/xmmap.c
index 23efe3888..04c6babc2 100644
--- a/openbsd-compat/xmmap.c
+++ b/openbsd-compat/xmmap.c
@@ -23,7 +23,7 @@
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26/* $Id: xmmap.c,v 1.14 2007/06/11 02:52:24 djm Exp $ */ 26/* $Id: xmmap.c,v 1.15 2009/02/16 04:21:40 djm Exp $ */
27 27
28#include "includes.h" 28#include "includes.h"
29 29
@@ -71,7 +71,8 @@ xmmap(size_t size)
71 fatal("mkstemp(\"%s\"): %s", 71 fatal("mkstemp(\"%s\"): %s",
72 MM_SWAP_TEMPLATE, strerror(errno)); 72 MM_SWAP_TEMPLATE, strerror(errno));
73 unlink(tmpname); 73 unlink(tmpname);
74 ftruncate(tmpfd, size); 74 if (ftruncate(tmpfd, size) != 0)
75 fatal("%s: ftruncate: %s", __func__, strerror(errno));
75 address = mmap(NULL, size, PROT_WRITE|PROT_READ, MAP_SHARED, 76 address = mmap(NULL, size, PROT_WRITE|PROT_READ, MAP_SHARED,
76 tmpfd, (off_t)0); 77 tmpfd, (off_t)0);
77 close(tmpfd); 78 close(tmpfd);