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 */
