memrchr -> mymemrchr for FreeBSD

This commit is contained in:
Russ Cox 2008-07-14 16:48:16 +00:00
parent 347c54dbd3
commit 46bd8d37d2
1 changed files with 2 additions and 2 deletions

View File

@ -1010,7 +1010,7 @@ parsename(char *name, Elemlist *e)
}
void*
memrchr(void *va, int c, long n)
mymemrchr(void *va, int c, long n)
{
uchar *a, *e;
@ -1150,7 +1150,7 @@ namec(char *aname, int amode, int omode, ulong perm)
strcpy(tmperrbuf, up->errstr);
NameError:
len = prefix+e.off[npath];
if(len < ERRMAX/3 || (name=memrchr(aname, '/', len))==nil || name==aname)
if(len < ERRMAX/3 || (name=mymemrchr(aname, '/', len))==nil || name==aname)
snprint(up->genbuf, sizeof up->genbuf, "%.*s", len, aname);
else
snprint(up->genbuf, sizeof up->genbuf, "...%.*s", (int)(len-(name-aname)), name);