* released 1.2.6
* clean-up patch from Alexander Lazic fixes build on Debian 3.1 (socklen_t).
diff --git a/haproxy.c b/haproxy.c
index 8994177..34d9b40 100644
--- a/haproxy.c
+++ b/haproxy.c
@@ -77,7 +77,7 @@
 #include "include/appsession.h"
 
 #define HAPROXY_VERSION "1.2.6"
-#define HAPROXY_DATE	"2005/07/06"
+#define HAPROXY_DATE	"2005/08/07"
 
 /* this is for libc5 for example */
 #ifndef TCP_NODELAY
@@ -1651,7 +1651,7 @@
 /* this either returns the sockname or the original destination address. Code
  * inspired from Patrick Schaaf's example of nf_getsockname() implementation.
  */
-static int get_original_dst(int fd, struct sockaddr_in *sa, int *salen) {
+static int get_original_dst(int fd, struct sockaddr_in *sa, socklen_t *salen) {
 #if defined(TPROXY) && defined(SO_ORIGINAL_DST)
     return getsockopt(fd, SOL_IP, SO_ORIGINAL_DST, (void *)sa, salen);
 #else
@@ -1767,7 +1767,7 @@
     }
     else if (s->proxy->options & PR_O_TRANSP) {
 	/* in transparent mode, use the original dest addr if no dispatch specified */
-	int salen = sizeof(struct sockaddr_in);
+	socklen_t salen = sizeof(struct sockaddr_in);
 	if (get_original_dst(s->cli_fd, &s->srv_addr, &salen) == -1) {
 	    qfprintf(stderr, "Cannot get original server address.\n");
 	    return SN_ERR_INTERNAL;
@@ -1778,7 +1778,7 @@
      * the port the client connected to with an offset. */
     if (s->srv != NULL && s->srv->state & SRV_MAPPORTS) {
 	struct sockaddr_in sockname;
-	int namelen;
+	socklen_t namelen;
 
 	namelen = sizeof(sockname);
 	if (get_original_dst(s->cli_fd, (struct sockaddr_in *)&sockname, &namelen) == -1)
@@ -2441,7 +2441,7 @@
 
     while (p->nbconn < p->maxconn) {
 	struct sockaddr_storage addr;
-	int laddr = sizeof(addr);
+	socklen_t laddr = sizeof(addr);
 	if ((cfd = accept(fd, (struct sockaddr *)&addr, &laddr)) == -1) {
 	    switch (errno) {
 	    case EAGAIN:
@@ -2589,7 +2589,7 @@
 	if ((p->mode == PR_MODE_TCP || p->mode == PR_MODE_HTTP)
 	    && (p->logfac1 >= 0 || p->logfac2 >= 0)) {
 	    struct sockaddr_storage sockname;
-	    int namelen;
+	    socklen_t namelen;
 
 	    namelen = sizeof(sockname);
 	    if (addr.ss_family != AF_INET ||
@@ -2630,7 +2630,7 @@
 
 	if ((global.mode & MODE_DEBUG) && (!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE))) {
 	    struct sockaddr_in sockname;
-	    int namelen;
+	    socklen_t namelen;
 	    int len;
 	    namelen = sizeof(sockname);
 	    if (addr.ss_family != AF_INET ||
@@ -2754,7 +2754,8 @@
     struct task *t = fdtab[fd].owner;
     struct server *s = t->context;
 
-    int skerr, lskerr;
+    int skerr;
+    socklen_t lskerr;
     lskerr = sizeof(skerr);
     getsockopt(fd, SOL_SOCKET, SO_ERROR, &skerr, &lskerr);
     /* in case of TCP only, this tells us if the connection succeeded */