blob: b208db332226cdc915e7b0ab4ab14728659b85ed (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
$NetBSD: patch-aa,v 1.4 2005/04/01 03:28:36 kim Exp $
--- uname.c.orig 1994-08-11 17:37:53.000000000 -0400
+++ uname.c 2005-03-31 22:23:31.000000000 -0500
@@ -15,6 +15,7 @@
static char *rcsId = "@(#)$Id: patch-aa,v 1.4 2005/04/01 03:28:36 kim Exp $";
#include <stdio.h>
+#include <strings.h>
#include "config.h"
#ifdef DOUNAME
@@ -66,14 +67,13 @@
char *uptr;
{
FILE * uucpf;
- char * hostname;
+ char * p;
if ((uucpf = fopen(HOSTFILE,"r")) == NULL) {
fprintf(stderr,"Couldn't open %s to determine hostname. Contact your system administrator.\n",
HOSTFILE);
exit(1);
} else {
fgets(uptr, 256, uucpf);
- fclose(tmpfp);
}
p = index(uptr, '\n');
if (p)
|