~aghuloum/ikarus/ikarus.dev

« back to all changes in this revision

Viewing changes to src/ikarus-getaddrinfo.c

  • Committer: Abdulaziz Ghuloum
  • Date: 2008-06-09 06:15:25 UTC
  • Revision ID: aghuloum@cs.indiana.edu-20080609061525-z12bxxl4394ry02p
EAI_SYSTEM and ECANCELED are undefined under cygwin; added
conditional #define.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
  const struct addrinfo* hints, struct addrinfo** res){ 
34
34
  /* hints not used */
35
35
  struct servent* sent = getservbyname(servname, "tcp");
36
 
  if(sent == 0) return -1;
 
36
  if (sent == 0) return -1;
37
37
  struct hostent* hent = gethostbyname(hostname);
38
38
  if (!hent){
39
39
   return -1;
57
57
  memcpy(&sa_in->sin_addr, *ap, sizeof(struct in_addr));
58
58
  r->ai_next = NULL;
59
59
  *res = r;
60
 
  return (0);
 
60
  return 0;
61
61
}
62
62
 
63
63
void