From d3dfec19d30b50a0d6d185d07344d24d6819e061 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sat, 5 Jun 2021 11:35:50 +0000 Subject: And with the right headers --- src/smtpd-starttls-proxy/smtpd-starttls-proxy-io.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/smtpd-starttls-proxy/smtpd-starttls-proxy-io.c b/src/smtpd-starttls-proxy/smtpd-starttls-proxy-io.c index d73a420..5eff7e6 100644 --- a/src/smtpd-starttls-proxy/smtpd-starttls-proxy-io.c +++ b/src/smtpd-starttls-proxy/smtpd-starttls-proxy-io.c @@ -5,12 +5,11 @@ #include #include #include +#include #include -#include #include #include -#include #include #include #include @@ -230,8 +229,8 @@ static int process_client_line (char const *s) /* Engine */ -static int child (int, int) gccattr_noreturn ; -static int child (int fdr, int fdw) +static void child (int, int) gccattr_noreturn ; +static void child (int fdr, int fdw) { iopause_fd x[4] = { { .fd = 0 }, { .fd = 1 }, { .fd = fdr }, { .fd = fdw } } ; tain_t deadline ; @@ -323,7 +322,7 @@ static int child (int fdr, int fdw) if (wantexec >= 2) { int got = 0 ; - if (fd_write(fdctl, "Y", 1) < 0) + if (write(fdctl, "Y", 1) != 1) strerr_diefu1sys(111, "send ucspi-tls start command") ; fd_shutdown(fdctl, 1) ; for (;;) @@ -392,7 +391,7 @@ int main (int argc, char const *const *argv) case 0 : close(p[0][1]) ; close(p[1][0]) ; - return child(p[0][0], p[1][1]) ; + child(p[0][0], p[1][1]) ; default : break ; } -- cgit v1.3.1