$OpenBSD: patch-mdnsctl_mdnsl_c,v 1.1 2013/10/01 07:36:06 jca Exp $
msgbuf_write() returns 1 on success
https://github.com/haesbaert/mdnsd/commit/cdd16e971a0204b8439b07a81879573e01fae4cb
--- mdnsctl/mdnsl.c.orig	Tue Oct  1 08:51:23 2013
+++ mdnsctl/mdnsl.c	Tue Oct  1 08:51:25 2013
@@ -510,7 +510,7 @@ ibuf_send_imsg(struct imsgbuf *ibuf, u_int32_t type,
 
 	imsg_close(ibuf, wbuf);
 
-	if (msgbuf_write(&ibuf->w))
+	if (msgbuf_write(&ibuf->w) == -1)
 		return (-1);
 
 	return (0);
