summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjeremy <>2011-01-08 00:47:19 +0000
committerjeremy <>2011-01-08 00:47:19 +0000
commit4d7b7131e400dc1324f2daa39f007c5ac043b349 (patch)
tree414289b01da26ce7115c97f2c85c9c72e361b4b0
parentdc99e0127d6fec60b05811ba3a2d2b087cd26184 (diff)
downloadopenbsd-4d7b7131e400dc1324f2daa39f007c5ac043b349.tar.gz
openbsd-4d7b7131e400dc1324f2daa39f007c5ac043b349.tar.bz2
openbsd-4d7b7131e400dc1324f2daa39f007c5ac043b349.zip
Enable unix datagram support by treating ENOBUFS like EAGAIN.
Separate commit requested by deraadt@. OK nicm@
-rw-r--r--src/usr.bin/nc/atomicio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/usr.bin/nc/atomicio.c b/src/usr.bin/nc/atomicio.c
index e9d98b3561..feb6f19440 100644
--- a/src/usr.bin/nc/atomicio.c
+++ b/src/usr.bin/nc/atomicio.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: atomicio.c,v 1.9 2007/09/07 14:50:44 tobias Exp $ */ 1/* $OpenBSD: atomicio.c,v 1.10 2011/01/08 00:47:19 jeremy Exp $ */
2/* 2/*
3 * Copyright (c) 2006 Damien Miller. All rights reserved. 3 * Copyright (c) 2006 Damien Miller. All rights reserved.
4 * Copyright (c) 2005 Anil Madhavapeddy. All rights reserved. 4 * Copyright (c) 2005 Anil Madhavapeddy. All rights reserved.
@@ -53,7 +53,7 @@ atomicio(ssize_t (*f) (int, void *, size_t), int fd, void *_s, size_t n)
53 case -1: 53 case -1:
54 if (errno == EINTR) 54 if (errno == EINTR)
55 continue; 55 continue;
56 if (errno == EAGAIN) { 56 if ((errno == EAGAIN) || (errno == ENOBUFS)) {
57 (void)poll(&pfd, 1, -1); 57 (void)poll(&pfd, 1, -1);
58 continue; 58 continue;
59 } 59 }