diff options
author | Charles Longeau <github@chl.be> | 2012-10-11 01:12:51 +0200 |
---|---|---|
committer | Charles Longeau <github@chl.be> | 2012-10-11 01:12:51 +0200 |
commit | 5f64ed756d0ab0404697f58a970efca698cefd80 (patch) | |
tree | 349157d401a9a321286ccbc9450020e80cf75093 /openbsd-compat | |
parent | sync with -current (diff) | |
download | OpenSMTPD-5f64ed756d0ab0404697f58a970efca698cefd80.tar.xz OpenSMTPD-5f64ed756d0ab0404697f58a970efca698cefd80.zip |
add missing available_fds() prototype
Diffstat (limited to 'openbsd-compat')
-rw-r--r-- | openbsd-compat/imsg.c | 22 | ||||
-rw-r--r-- | openbsd-compat/imsg.h | 1 |
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 *); |