Index: stocks/http.c
--- stocks/http.c.orig
+++ stocks/http.c
@@ -20,13 +20,13 @@
 
 #define __HTTP_C__
 
+#include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <netdb.h>
 #include <unistd.h>
 
-#include <sys/types.h>
 #include <ctype.h>
 #include <string.h>
 #include <stdlib.h>
@@ -98,7 +98,7 @@ libstocks_return_code http_get(char *http_file, char *
   setsockopt(s, SOL_SOCKET, SO_KEEPALIVE, 0, 0);
 
   /* connect to server */
-  if (connect(s, &server, sizeof(server)) < 0)
+  if (connect(s, (struct sockaddr *)&server, sizeof(server)) < 0)
     {
 #ifdef DEBUG
       printf(" connect to server : NOK\n");
