]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[BUILD] build fixes for Solaris
authorWilly Tarreau <w@1wt.eu>
Sun, 8 Mar 2009 21:25:28 +0000 (22:25 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 8 Mar 2009 21:25:28 +0000 (22:25 +0100)
One build error in stream_sock.c when MSG_NOSIGNAL is not defined,
and a warning in task.c.

src/stream_sock.c
src/task.c

index 65a1e379c70fe208b874886083aeb7933928102e..e68775a59c1a5421a145677a42307d69e738e629 100644 (file)
@@ -560,11 +560,11 @@ static int stream_sock_write_loop(struct stream_interface *si, struct buffer *b)
                        int skerr;
                        socklen_t lskerr = sizeof(skerr);
 
-                       ret = getsockopt(fd, SOL_SOCKET, SO_ERROR, &skerr, &lskerr);
+                       ret = getsockopt(si->fd, SOL_SOCKET, SO_ERROR, &skerr, &lskerr);
                        if (ret == -1 || skerr)
                                ret = -1;
                        else
-                               ret = send(fd, b->w, max, MSG_DONTWAIT);
+                               ret = send(si->fd, b->w, max, MSG_DONTWAIT);
                }
 #else
                ret = send(si->fd, b->w, max, MSG_DONTWAIT | MSG_NOSIGNAL);
index e91a26b1dc1c861adfcdd8b235071d42f43d4ad2..6f7b26406626d5816f2bf75d1ad34251cdc238c6 100644 (file)
@@ -10,6 +10,8 @@
  *
  */
 
+#include <string.h>
+
 #include <common/config.h>
 #include <common/eb32tree.h>
 #include <common/memory.h>