summaryrefslogtreecommitdiff
path: root/games/atc
diff options
context:
space:
mode:
authorkstailey <kstailey@cvs.openbsd.org>1997-06-18 19:03:08 +0000
committerkstailey <kstailey@cvs.openbsd.org>1997-06-18 19:03:08 +0000
commit78972811db4829fdf182ea3527504c6c7987390a (patch)
tree70ef28e532994ff3df4dac67d6667c5bf2ef27af /games/atc
parent9a26adf9d6c9e2a434aec4acca81fd835eaf5482 (diff)
use uname(3) not gethostname(3); removes some SYSV conditional code
Diffstat (limited to 'games/atc')
-rw-r--r--games/atc/include.h2
-rw-r--r--games/atc/log.c12
2 files changed, 1 insertions, 13 deletions
diff --git a/games/atc/include.h b/games/atc/include.h
index fb600f12768..98e5e3004e1 100644
--- a/games/atc/include.h
+++ b/games/atc/include.h
@@ -60,11 +60,9 @@
#include <sys/file.h>
#endif
-#ifdef SYSV
#include <fcntl.h>
#include <unistd.h>
#include <sys/utsname.h>
-#endif
#include <signal.h>
#include <math.h>
diff --git a/games/atc/log.c b/games/atc/log.c
index 53f3590a918..a9680218ac1 100644
--- a/games/atc/log.c
+++ b/games/atc/log.c
@@ -125,9 +125,7 @@ log_score(list_em)
struct passwd *pw;
char *cp;
SCORE score[100], thisscore;
-#ifdef SYSV
struct utsname name;
-#endif
#ifdef BSD
if (flock(fileno(score_fp), LOCK_EX) < 0)
@@ -158,16 +156,8 @@ log_score(list_em)
return (-1);
}
strcpy(thisscore.name, pw->pw_name);
-#ifdef BSD
- if (gethostname(thisscore.host, sizeof (thisscore.host)) < 0) {
- perror("gethostname");
- return (-1);
- }
-#endif
-#ifdef SYSV
uname(&name);
- strcpy(thisscore.host, name.sysname);
-#endif
+ strcpy(thisscore.host, name.nodename);
cp = strrchr(file, '/');
if (cp == NULL) {