Bladeren bron

link-time warning for obsolescent/removed network funcs

Signed-off-by: aldot <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer 14 jaren geleden
bovenliggende
commit
fdc6f045fa
1 gewijzigde bestanden met toevoegingen van 4 en 0 verwijderingen
  1. 4 0
      libc/inet/resolv.c

+ 4 - 0
libc/inet/resolv.c

@@ -2154,6 +2154,7 @@ int gethostbyname_r(const char *name,
 	return i;
 }
 libc_hidden_def(gethostbyname_r)
+link_warning(gethostbyname_r, "gethostbyname_r is obsolescent, use getnameinfo() instead.");
 #endif
 
 
@@ -2469,6 +2470,7 @@ int gethostbyaddr_r(const void *addr, socklen_t addrlen,
 #undef in6
 }
 libc_hidden_def(gethostbyaddr_r)
+link_warning(gethostbyaddr_r, "gethostbyaddr_r is obsolescent, use getaddrinfo() instead.");
 #endif
 
 
@@ -2586,6 +2588,7 @@ struct hostent *gethostbyname(const char *name)
 #endif
 }
 libc_hidden_def(gethostbyname)
+link_warning(gethostbyname, "gethostbyname is obsolescent, use getnameinfo() instead.");
 #endif
 
 
@@ -2607,6 +2610,7 @@ struct hostent *gethostbyaddr(const void *addr, socklen_t len, int type)
 	return hp;
 }
 libc_hidden_def(gethostbyaddr)
+link_warning(gethostbyaddr, "gethostbyaddr is obsolescent, use getaddrinfo() instead.");
 #endif