From 4737321533a0bc8e70b4fada37a635d45fec043b Mon Sep 17 00:00:00 2001 From: claudio Date: Fri, 29 Dec 2023 11:48:47 +0000 Subject: [PATCH] Cleanup required headers form imsg.h. Right now only sys/queue.h is required to be included for imsg.h. The only exception is if imsg_composev() is used, then sys/uio.h is needed to access struct iovec. OK tb@ --- lib/libutil/imsg_init.3 | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/libutil/imsg_init.3 b/lib/libutil/imsg_init.3 index c581f3a6ec1..d61610151a3 100644 --- a/lib/libutil/imsg_init.3 +++ b/lib/libutil/imsg_init.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: imsg_init.3,v 1.32 2023/12/13 00:37:42 jsg Exp $ +.\" $OpenBSD: imsg_init.3,v 1.33 2023/12/29 11:48:47 claudio Exp $ .\" .\" Copyright (c) 2023 Claudio Jeker .\" Copyright (c) 2010 Nicholas Marriott @@ -15,7 +15,7 @@ .\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING .\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: December 13 2023 $ +.Dd $Mdocdate: December 29 2023 $ .Dt IMSG_INIT 3 .Os .Sh NAME @@ -41,10 +41,7 @@ .Nm imsg_clear .Nd IPC messaging functions .Sh SYNOPSIS -.In sys/types.h .In sys/queue.h -.In sys/uio.h -.In stdint.h .In imsg.h .Ft void .Fn imsg_init "struct imsgbuf *imsgbuf" "int fd" @@ -70,9 +67,6 @@ .Fn imsg_compose "struct imsgbuf *imsgbuf" "uint32_t type" "uint32_t id" \ "pid_t pid" "int fd" "const void *data" "size_t datalen" .Ft int -.Fn imsg_composev "struct imsgbuf *imsgbuf" "uint32_t type" "uint32_t id" \ - "pid_t pid" "int fd" "const struct iovec *iov" "int iovcnt" -.Ft int .Fn imsg_compose_ibuf "struct imsgbuf *imsgbuf" "uint32_t type" \ "uint32_t id" "pid_t pid" "struct ibuf *buf" .Ft "struct ibuf *" @@ -90,6 +84,10 @@ .Fn imsg_flush "struct imsgbuf *imsgbuf" .Ft void .Fn imsg_clear "struct imsgbuf *imsgbuf" +.In sys/uio.h +.Ft int +.Fn imsg_composev "struct imsgbuf *imsgbuf" "uint32_t type" "uint32_t id" \ + "pid_t pid" "int fd" "const struct iovec *iov" "int iovcnt" .Sh DESCRIPTION The .Nm imsg -- 2.20.1