aboutsummaryrefslogtreecommitdiffstats
path: root/openbsd-compat
diff options
context:
space:
mode:
authorCharles Longeau <github@chl.be>2012-10-11 01:12:51 +0200
committerCharles Longeau <github@chl.be>2012-10-11 01:12:51 +0200
commit5f64ed756d0ab0404697f58a970efca698cefd80 (patch)
tree349157d401a9a321286ccbc9450020e80cf75093 /openbsd-compat
parentsync with -current (diff)
downloadOpenSMTPD-5f64ed756d0ab0404697f58a970efca698cefd80.tar.xz
OpenSMTPD-5f64ed756d0ab0404697f58a970efca698cefd80.zip
add missing available_fds() prototype
Diffstat (limited to 'openbsd-compat')
-rw-r--r--openbsd-compat/imsg.c22
-rw-r--r--openbsd-compat/imsg.h1
2 files changed, 12 insertions, 11 deletions
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 *);