mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-27 19:23:40 +00:00
fix build error
This commit is contained 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
|
||||
|
||||
|
||||
+3
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user