mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Fix compilation on Minix3
- Include arpa/inet.h to get hton* ntoh* functions. - Use socklen_t instead of int. - Try to define PF_INET to AF_INET if it doesn't exist. Reported-by: Andy Tanenbaum <ast@cs.vu.nl>
This commit is contained in:
parent
463cce0b66
commit
b9d66bd9bd
@ -32,6 +32,10 @@
|
||||
#endif
|
||||
#endif /* HAVE_GETIFADDRS */
|
||||
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#include "elinks.h"
|
||||
|
||||
#include "config/options.h"
|
||||
@ -275,7 +279,7 @@ get_pasv_socket(struct socket *ctrl_socket, struct sockaddr_storage *addr)
|
||||
struct sockaddr *pasv_addr = (struct sockaddr *) addr;
|
||||
size_t addrlen;
|
||||
int sock = -1;
|
||||
int len;
|
||||
socklen_t len;
|
||||
#ifdef CONFIG_IPV6
|
||||
struct sockaddr_in6 bind_addr6;
|
||||
|
||||
@ -449,7 +453,7 @@ static void
|
||||
connected(struct socket *socket)
|
||||
{
|
||||
int err = 0;
|
||||
int len = sizeof(err);
|
||||
socklen_t len = sizeof(err);
|
||||
|
||||
assertm(socket->connect_info, "Lost connect_info!");
|
||||
if_assert_failed return;
|
||||
|
@ -37,6 +37,13 @@
|
||||
#define IP_ADDRESS_BUFFER_SIZE INET_ADDRSTRLEN
|
||||
#endif
|
||||
|
||||
#ifndef PF_INET
|
||||
#define PF_INET AF_INET
|
||||
#endif
|
||||
|
||||
#ifndef PF_INET6
|
||||
#define PF_INET6 AF_INET6
|
||||
#endif
|
||||
|
||||
/* Attempt to workaround the EINTR mess. */
|
||||
#if defined(EINTR) && !defined(CONFIG_OS_WIN32)
|
||||
|
@ -15,6 +15,10 @@
|
||||
#include <netinet/in.h> /* OS/2 needs this after sys/types.h */
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
#include "elinks.h"
|
||||
|
||||
#include "protocol/bittorrent/bencoding.h"
|
||||
|
Loading…
Reference in New Issue
Block a user