freecwmp
[Top] [All Lists]

[PATCH] fix libcurl on 32 bit systems

To: freecwmp@linux-mips.org
Subject: [PATCH] fix libcurl on 32 bit systems
From: Jonas Gorski <jonas.gorski@gmail.com>
Date: Mon, 23 Jul 2012 17:28:46 +0200
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:x-mailer; bh=FNE7MLIMsy0XCR4/wRR8DlCH0r6AitaFykJ40cXg3rY=; b=jLRCEnnJdm5qVYzanT7nXXPO1cYVfD1i4GIuYMhNtBCNH8kXBl4IFvC9WKkQZkQoq8 jt8C+A4bsAqteijFwvNmWo15OytTj1MOCJqbjBYqicE1bPXWZuII6npUQu4GF0X5y6Ew oIqxgKT7DltSxHhZNGsVa1/RXuu5lKUqHiiT9H4S6zBh+w2dlCoLXRhT1ftMeb2v6a+j /Q8ymMhSSUiZxpvHJ8ZMB8BY2pqEL3cHIpDzXplPJhPXtVnbMC/yR7vuuW0/hlZwKkCH TIiYPuKWwtRUk4b/McC8tl1H3ZXlSJpn5zff/jTgC4lcyfEntmTb+67LxGC9c17Wm3UV dXZQ==
Original-recipient: rfc822;freecwmp@linux-mips.org
Sender: freecwmp-bounce@linux-mips.org
Curl expects size_t as the return type for the write function callback,
but freecwmp always returned a 64 bit int. This produced errors on big
endian 32 bit systems, as the upper 32 bit were always zero.

Contributed by T-Labs, Deutsche Telekom Innovation Laboratories

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
---
 src/http/http.c |    2 +-
 src/http/http.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/http/http.c b/src/http/http.c
index 19d9faf..278bd27 100644
--- a/src/http/http.c
+++ b/src/http/http.c
@@ -166,7 +166,7 @@ done:
 }
 
 #ifdef HTTP_CURL
-static uint64_t
+static size_t
 http_get_response(void *buffer, size_t size, size_t rxed, char **msg_in)
 {
        FC_DEVEL_DEBUG("enter");
diff --git a/src/http/http.h b/src/http/http.h
index 27cd9f4..4b1b14e 100644
--- a/src/http/http.h
+++ b/src/http/http.h
@@ -44,7 +44,7 @@ struct http_server
 };
 
 #ifdef HTTP_CURL
-static uint64_t http_get_response(void *buffer, size_t size, size_t rxed, char 
**msg_in);
+static size_t http_get_response(void *buffer, size_t size, size_t rxed, char 
**msg_in);
 #endif /* HTTP_CURL */
 
 int8_t http_client_init(void);
-- 
1.7.10


<Prev in Thread] Current Thread [Next in Thread>