diff options
author | Joerg Wunsch <joerg@FreeBSD.org> | 1998-06-03 20:01:28 +0000 |
---|---|---|
committer | Joerg Wunsch <joerg@FreeBSD.org> | 1998-06-03 20:01:28 +0000 |
commit | 09caeadeda450ecf3f34f8aa556c614a18ecb4fb (patch) | |
tree | ac70ce132f0dee9085f3f9bc5e058e4deb81dac3 /libexec/bootpd | |
parent | 3977d3f48897431cd6a48251e95302b413543db1 (diff) | |
download | src-09caeadeda450ecf3f34f8aa556c614a18ecb4fb.tar.gz src-09caeadeda450ecf3f34f8aa556c614a18ecb4fb.zip |
Notes
Diffstat (limited to 'libexec/bootpd')
-rw-r--r-- | libexec/bootpd/bootpd.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libexec/bootpd/bootpd.c b/libexec/bootpd/bootpd.c index 0fe07e1b7dd4..68e35d50223a 100644 --- a/libexec/bootpd/bootpd.c +++ b/libexec/bootpd/bootpd.c @@ -19,7 +19,7 @@ PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - $Id: bootpd.c,v 1.6 1997/02/22 14:21:02 peter Exp $ + $Id: bootpd.c,v 1.7 1997/05/11 14:27:03 phk Exp $ ************************************************************************/ @@ -162,8 +162,7 @@ char *progname; char *chdir_path; struct in_addr my_ip_addr; -struct utsname my_uname; -char *hostname; +char *hostname, default_hostname[MAXHOSTNAMELEN + 1]; /* Flags set by signal catcher. */ PRIVATE int do_readtab = 0; @@ -256,11 +255,11 @@ main(argc, argv) stmp = NULL; timeout = &actualtimeout; - if (uname(&my_uname) < 0) { + if (gethostname(default_hostname, MAXHOSTNAMELEN) < 0) { report(LOG_ERR, "bootpd: can't get hostname\n"); exit(1); } - hostname = my_uname.nodename; + hostname = default_hostname; /* * Read switches. |