mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-02 06:03:50 +00:00
fcc5e609e5
the first 32 chars of the hostname - patch helper-script to generate less bogus intermediate output - NB: This port will still register a wrong dependency on dns/host when dns/bind is installed
23 lines
589 B
C
23 lines
589 B
C
--- main.c.orig Fri May 7 13:50:04 2004
|
|
+++ main.c Fri May 7 13:50:10 2004
|
|
@@ -1215,15 +1215,14 @@
|
|
{
|
|
float tmpquat[4];
|
|
float vect[3] = {0.0, 1.0, 0.0};
|
|
- struct utsname un;
|
|
- struct hostent* he;
|
|
+ char namebuf[256];
|
|
+ struct hostent* he = NULL;
|
|
struct in_addr in;
|
|
|
|
memset(&local, 0, sizeof(site));
|
|
|
|
- uname(&un);
|
|
- strcpy(local.name, un.nodename);
|
|
- he = gethostbyname(un.nodename);
|
|
+ if (gethostname(namebuf,256) == 0)
|
|
+ he = gethostbyname(namebuf);
|
|
if(!he)
|
|
{
|
|
printf("Error gethostbynaming local hostname");
|