Browse Source

fix build error

pull/4/merge
Max Lv 11 years ago
parent
commit
5e08c8f5d5
3 changed files with 349 additions and 384 deletions
  1. 5
      config.h.in
  2. 723
      configure
  3. 5
      src/redir.c

5
config.h.in

@ -230,11 +230,6 @@
# endif
#endif
/* Enable large inode numbers on Mac OS X 10.5. */
#ifndef _DARWIN_USE_64_BIT_INODE
# define _DARWIN_USE_64_BIT_INODE 1
#endif
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS

723
configure
File diff suppressed because it is too large
View File

5
src/redir.c

@ -16,6 +16,8 @@
#include <strings.h>
#include <time.h>
#include <unistd.h>
#include <limits.h>
#include <linux/netfilter_ipv4.h>
#include "utils.h"
#include "redir.h"
@ -40,7 +42,6 @@ int getdestaddr(int fd, struct sockaddr_in *destaddr) {
error = getsockopt(fd, SOL_IP, SO_ORIGINAL_DST, destaddr, &socklen);
if (error) {
log_errno(LOG_WARNING, "getsockopt");
return -1;
}
return 0;
@ -473,7 +474,7 @@ static void accept_cb (EV_P_ ev_io *w, int revents) {
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
int index = clock() % listener->remote_num;
int err = getaddrinfo(listener->remote_host[index], listener->remote_port, &hints, &res);
err = getaddrinfo(listener->remote_host[index], listener->remote_port, &hints, &res);
if (err) {
ERROR("getaddrinfo");
return;

Loading…
Cancel
Save