Skip to content

Commit

Permalink
Bugfix: Cannot build net plugin on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
i0gan committed Aug 12, 2024
1 parent 88b345b commit 6a86bb4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/squick/plugin/net/net.cc
Original file line number Diff line number Diff line change
Expand Up @@ -342,16 +342,16 @@ std::string Net::GetIpByDomain(std::string domain) {
struct hostent *hptr;
hptr = gethostbyname(domain.c_str());
if (hptr == NULL) {
printf("gethostbyname error for host: %s: %s\n", domain.c_str(), hstrerror(h_errno));
//printf("gethostbyname error for host: %s: %s\n", domain.c_str(), hstrerror(h_errno));
return "";
}

char **pptr;
char str[INET_ADDRSTRLEN];
for (pptr=hptr->h_aliases; *pptr!=NULL; pptr++)
{
printf("\ttalias: %s\n", *pptr);
}
// for (pptr=hptr->h_aliases; *pptr!=NULL; pptr++)
// {
// printf("\ttalias: %s\n", *pptr);
// }

// output ip
for (pptr = hptr->h_addr_list; *pptr!=NULL; pptr++)
Expand Down

0 comments on commit 6a86bb4

Please sign in to comment.