From 8617eaf207c9bf2227ed5e4ee4db4346f09d5e77 Mon Sep 17 00:00:00 2001 From: jweiss Date: Fri, 16 Sep 1994 22:01:55 +0000 Subject: [PATCH] strings.h -> string.h, the former doesn't exists on the sun now. index -> strchr; POSIX, etc. --- update/hostname.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/update/hostname.c b/update/hostname.c index 98e41c4b..1cb89e37 100644 --- a/update/hostname.c +++ b/update/hostname.c @@ -17,7 +17,7 @@ static char *rcsid_hostname_c = "$Header$"; #include #include #include -#include +#include char * PrincipalHostname(alias) char *alias; @@ -25,7 +25,7 @@ PrincipalHostname(alias) struct hostent *h; char *phost = alias; if ((h=gethostbyname(alias)) != (struct hostent *)NULL) { - char *p = index(h->h_name, '.'); + char *p = strchr(h->h_name, '.'); if (p) *p = NULL; p = phost = h->h_name; -- 2.45.2