* Applied a patch from Igor Khavkine <i_khavki@alcor.concordia.ca> to

make the package build on the Hurd. Closes: #98562


git-svn-id: file:///srv/svn/joey/bsdgames-trunk@5150 a4a2c43b-8ac3-0310-8836-e0e880c912e2
This commit is contained in:
joey
2001-05-24 03:22:47 +00:00
parent 7ce310d047
commit 831647efe0
5 changed files with 110 additions and 10 deletions

View File

@@ -393,7 +393,11 @@ list_drivers()
static SOCKET test;
int test_socket;
int namelen;
# ifdef MAXHOSTNAMELEN
char local_name[MAXHOSTNAMELEN + 1];
# else
char local_name[] = "127.0.0.1";
# endif
static int initial = TRUE;
static struct in_addr local_address;
struct hostent *hp;
@@ -414,11 +418,13 @@ list_drivers()
# ifndef BROADCAST
sethostent(1); /* don't bother to close host file */
# endif
# ifdef MAXHOSTNAMELEN
if (gethostname(local_name, sizeof local_name) < 0) {
leave(1, "Sorry, I have no name.");
/* NOTREACHED */
}
local_name[sizeof(local_name) - 1] = '\0';
# endif
if ((hp = gethostbyname(local_name)) == NULL) {
leave(1, "Can't find myself.");
/* NOTREACHED */