| # | Line 7 | Line 7 | static const char RCSid[] = "$Id$"; | |
|---|---|---|
| 7 | ||
| 8 | #include "copyright.h" | |
| 9 | ||
| 10 | < | #ifndef BSD |
| 10 | > | #include <unistd.h> |
| 11 | ||
| 12 | < | #include <sys/utsname.h> |
| 12 | > | #include "rtmisc.h" |
| 13 | ||
| 14 | char * | |
| 15 | myhostname() | |
| 16 | { | |
| 17 | – | static struct utsname nambuf; |
| 18 | – | |
| 19 | – | if (!nambuf.nodename[0]) |
| 20 | – | uname(&nambuf); |
| 21 | – | return(nambuf.nodename); |
| 22 | – | } |
| 23 | – | |
| 24 | – | #else |
| 25 | – | |
| 26 | – | char * |
| 27 | – | myhostname() |
| 28 | – | { |
| 17 | static char hostname[65]; | |
| 18 | ||
| 19 | if (!hostname[0]) | |
| # | Line 33 | Line 21 | myhostname() | |
| 21 | return(hostname); | |
| 22 | } | |
| 23 | ||
| 36 | – | #endif |
| – | Removed lines |
| + | Added lines |
| < | Changed lines (old) |
| > | Changed lines (new) |