From 5f64ed756d0ab0404697f58a970efca698cefd80 Mon Sep 17 00:00:00 2001 From: Charles Longeau Date: Thu, 11 Oct 2012 01:12:51 +0200 Subject: add missing available_fds() prototype --- openbsd-compat/imsg.c | 22 +++++++++++----------- openbsd-compat/imsg.h | 1 + 2 files changed, 12 insertions(+), 11 deletions(-) (limited to 'openbsd-compat') diff --git a/openbsd-compat/imsg.c b/openbsd-compat/imsg.c index 51681bcb..761ae60f 100644 --- a/openbsd-compat/imsg.c +++ b/openbsd-compat/imsg.c @@ -34,17 +34,6 @@ int imsg_fd_overhead = 0; int imsg_get_fd(struct imsgbuf *); -void -imsg_init(struct imsgbuf *ibuf, int fd) -{ - msgbuf_init(&ibuf->w); - bzero(&ibuf->r, sizeof(ibuf->r)); - ibuf->fd = fd; - ibuf->w.fd = fd; - ibuf->pid = getpid(); - TAILQ_INIT(&ibuf->fds); -} - int available_fds(int n) { @@ -68,6 +57,17 @@ available_fds(int n) return (ret); } +void +imsg_init(struct imsgbuf *ibuf, int fd) +{ + msgbuf_init(&ibuf->w); + bzero(&ibuf->r, sizeof(ibuf->r)); + ibuf->fd = fd; + ibuf->w.fd = fd; + ibuf->pid = getpid(); + TAILQ_INIT(&ibuf->fds); +} + ssize_t imsg_read(struct imsgbuf *ibuf) { diff --git a/openbsd-compat/imsg.h b/openbsd-compat/imsg.h index d691f7d3..d0ae5e6f 100644 --- a/openbsd-compat/imsg.h +++ b/openbsd-compat/imsg.h @@ -94,6 +94,7 @@ int msgbuf_write(struct msgbuf *); void msgbuf_drain(struct msgbuf *, size_t); /* imsg.c */ +int available_fds(int); void imsg_init(struct imsgbuf *, int); ssize_t imsg_read(struct imsgbuf *); ssize_t imsg_get(struct imsgbuf *, struct imsg *); -- cgit v1.2.3-59-g8ed1b