]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mux: Only define pipe functions on linux.
authorOlivier Houchard <cognet@ci0.org>
Wed, 1 Nov 2017 12:55:10 +0000 (13:55 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 1 Nov 2017 14:10:51 +0000 (15:10 +0100)
Only define mux_pt_snd_pipe() and mux_pt_rcv_pipe() if splicing is
available.

src/mux_pt.c

index 54244c34efcd2caa3202da1dae72817879223d45..479f831c69b67215a692f987f6cf88debae6ec95 100644 (file)
@@ -170,6 +170,7 @@ static int mux_pt_snd_buf(struct conn_stream *cs, struct buffer *buf, int flags)
        return (cs->conn->xprt->snd_buf(cs->conn, buf, flags));
 }
 
+#if defined(CONFIG_HAP_LINUX_SPLICE)
 /* Send and get, using splicing */
 static int mux_pt_rcv_pipe(struct conn_stream *cs, struct pipe *pipe, unsigned int count)
 {
@@ -187,6 +188,7 @@ static int mux_pt_snd_pipe(struct conn_stream *cs, struct pipe *pipe)
 {
        return (cs->conn->xprt->snd_pipe(cs->conn, pipe));
 }
+#endif
 
 /* The mux operations */
 const struct mux_ops mux_pt_ops = {