wainstead / waverous

Waverous LambdaMOO is a C++ port of the original LambdaMOO server
4 stars 0 forks source link

gethostbyaddr() cast breaks NetBSD, and is obsolete anyway #4

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Compile on NetBSD
2. Fails in bg_name_lookup.c

What is the expected output? What do you see instead?

bg_name_lookup.c:822: error: invalid conversion from 'void*' to 'const char*'

According to the man page for gethostbyaddr on a GNU/Linux system:

 POSIX.1-2001  specifies  gethostbyname(),  gethostbyaddr(),  sethostent(),  endhostent(), gethostent(), and h_errno; gethostbyname(), gethost‐
       byaddr(), and h_errno are marked obsolescent in that standard.  POSIX.1-2008 removes the specifications of  gethostbyname(),  gethostbyaddr(),
       and h_errno, recommending the use of getaddrinfo(3) and getnameinfo(3) instead.

Original issue reported on code.google.com by wainst...@gmail.com on 21 Jan 2011 at 3:35