Commit 4c75d2cf authored by Ryan Jackson's avatar Ryan Jackson

Change rindex() to strrchr()

Default builds of uClibc (used for the Linux MFS) don't include
support for index() and rindex() (gone from the POSIX standard as of
POSIX.1-2008).  I've fixed the uClibc config to include them now, but
I need to build frisbee for an existing build of the Linux MFS with
the old uClibc.
parent 1c66e77f
......@@ -190,7 +190,7 @@ encrypt_readkey(char *keyfile, unsigned char *keybuf, int buflen)
fgets(akeybuf, sizeof(akeybuf), fp);
if ((cp = rindex(akeybuf, '\n')))
if ((cp = strrchr(akeybuf, '\n')))
*cp = '\0';
if (!hexstr_to_mem(keybuf, akeybuf, buflen)) {
fprintf(stderr, "%s: cannot parse encryption key\n",
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment