diff --git a/libudns/inet_XtoX.c b/libudns/inet_XtoX.c index f933cc51..6f05db6a 100644 --- a/libudns/inet_XtoX.c +++ b/libudns/inet_XtoX.c @@ -54,7 +54,7 @@ struct in_addr; # define inet_XtoX_prefix inet_ #endif #ifndef inet_XtoX_decl -# define inet_XtoX_decl __declspec(dllexport) +# define inet_XtoX_decl /* empty */ #endif #define cc2_(x,y) cc2__(x,y) diff --git a/src/local.c b/src/local.c index af653d4a..584c4216 100644 --- a/src/local.c +++ b/src/local.c @@ -382,7 +382,7 @@ static void server_recv_cb(EV_P_ ev_io *w, int revents) uint16_t p = ntohs(*(uint16_t *)(buf + 4 + in_addr_len)); dns_ntop(AF_INET, (const void *)(buf + 4), - host, INET_ADDRSTRLEN); + host, INET_ADDRSTRLEN); sprintf(port, "%d", p); } } else if (request->atyp == 3) { @@ -411,7 +411,7 @@ static void server_recv_cb(EV_P_ ev_io *w, int revents) uint16_t p = ntohs(*(uint16_t *)(buf + 4 + in6_addr_len)); dns_ntop(AF_INET6, (const void *)(buf + 4), - host, INET6_ADDRSTRLEN); + host, INET6_ADDRSTRLEN); sprintf(port, "%d", p); } } else { diff --git a/src/server.c b/src/server.c index 0c350b43..46675c88 100644 --- a/src/server.c +++ b/src/server.c @@ -393,7 +393,7 @@ static void server_recv_cb(EV_P_ ev_io *w, int revents) if (r > in_addr_len) { addr->sin_addr = *(struct in_addr *)(server->buf + offset); dns_ntop(AF_INET, (const void *)(server->buf + offset), - host, INET_ADDRSTRLEN); + host, INET_ADDRSTRLEN); offset += in_addr_len; } else { LOGE("invalid header with addr type %d", atyp); @@ -445,7 +445,7 @@ static void server_recv_cb(EV_P_ ev_io *w, int revents) if (r > in6_addr_len) { addr->sin6_addr = *(struct in6_addr *)(server->buf + offset); dns_ntop(AF_INET6, (const void *)(server->buf + offset), - host, INET6_ADDRSTRLEN); + host, INET6_ADDRSTRLEN); offset += in6_addr_len; } else { LOGE("invalid header with addr type %d", atyp); @@ -993,8 +993,8 @@ int main(int argc, char **argv) int option_index = 0; static struct option long_options[] = { - { "fast-open", no_argument, 0, 0 }, - { 0, 0, 0, 0 } + { "fast-open", no_argument, 0, 0 }, + { 0, 0, 0, 0 } }; opterr = 0; diff --git a/src/udprelay.c b/src/udprelay.c index 401aa269..c98a31a7 100644 --- a/src/udprelay.c +++ b/src/udprelay.c @@ -171,7 +171,7 @@ static int parse_udprealy_header(const char * buf, const int buf_len, } if (host != NULL) { dns_ntop(AF_INET, (const void *)(buf + offset), - host, INET_ADDRSTRLEN); + host, INET_ADDRSTRLEN); } offset += in_addr_len; } @@ -212,7 +212,7 @@ static int parse_udprealy_header(const char * buf, const int buf_len, } if (host != NULL) { dns_ntop(AF_INET6, (const void *)(buf + offset), - host, INET6_ADDRSTRLEN); + host, INET6_ADDRSTRLEN); } offset += in6_addr_len; } @@ -242,14 +242,14 @@ static char *get_addr_str(const struct sockaddr *sa) switch (sa->sa_family) { case AF_INET: dns_ntop(AF_INET, &(((struct sockaddr_in *)sa)->sin_addr), - addr, INET_ADDRSTRLEN); + addr, INET_ADDRSTRLEN); p = ntohs(((struct sockaddr_in *)sa)->sin_port); sprintf(port, "%d", p); break; case AF_INET6: dns_ntop(AF_INET6, &(((struct sockaddr_in6 *)sa)->sin6_addr), - addr, INET6_ADDRSTRLEN); + addr, INET6_ADDRSTRLEN); p = ntohs(((struct sockaddr_in *)sa)->sin_port); sprintf(port, "%d", p); break;