summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ldpctl/ldpctl.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2013-11-14 20:48:51 +0000
committerderaadt <deraadt@openbsd.org>2013-11-14 20:48:51 +0000
commit397afdbc21cd87ee8b77f78a6625971eb021723f (patch)
tree9c4e11447329fe88ad34105d4bbf11b87abf0b0c /usr.sbin/ldpctl/ldpctl.c
parentUse (N * sizeof(struct klist)) instead of (N * sizeof(struct klist *)) (diff)
downloadwireguard-openbsd-397afdbc21cd87ee8b77f78a6625971eb021723f.tar.xz
wireguard-openbsd-397afdbc21cd87ee8b77f78a6625971eb021723f.zip
cope with the EAGAIN API change for msgbuf_write()
ok benno
Diffstat (limited to 'usr.sbin/ldpctl/ldpctl.c')
-rw-r--r--usr.sbin/ldpctl/ldpctl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ldpctl/ldpctl.c b/usr.sbin/ldpctl/ldpctl.c
index ac38dc7ab14..135bf962e73 100644
--- a/usr.sbin/ldpctl/ldpctl.c
+++ b/usr.sbin/ldpctl/ldpctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldpctl.c,v 1.15 2013/06/04 02:40:17 claudio Exp $
+/* $OpenBSD: ldpctl.c,v 1.16 2013/11/14 20:48:52 deraadt Exp $
*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -28,6 +28,7 @@
#include <netmpls/mpls.h>
#include <err.h>
+#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -175,7 +176,7 @@ main(int argc, char *argv[])
}
while (ibuf->w.queued)
- if (msgbuf_write(&ibuf->w) < 0)
+ if (msgbuf_write(&ibuf->w) <= 0 && errno != EAGAIN)
err(1, "write error");
while (!done) {