fix build error

This commit is contained in:
Max Lv
2013-04-05 10:15:25 +08:00
parent d35c771fe2
commit 5e08c8f5d5
3 changed files with 349 additions and 384 deletions
-5
View File
@@ -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
Vendored
+346 -377
View File
File diff suppressed because it is too large Load Diff
+3 -2
View File
@@ -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;