From 26fe909e86f467f4feb940677ae2f06f02ea4405 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Mon, 5 Dec 2011 23:35:49 +0100 Subject: [PATCH] nbd-server: use modern alternative to legacy index() function index() was marked as obsolete by susv3, and isn't available on uClibc in some configurations, so use the equivalent strchr() instead: http://pubs.opengroup.org/onlinepubs/009695399/functions/index.html Signed-off-by: Peter Korsgaard --- nbd-server.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/nbd-server.c b/nbd-server.c index 4bbf413..810673e 100644 --- a/nbd-server.c +++ b/nbd-server.c @@ -324,7 +324,7 @@ int authorized_client(CLIENT *opts) { inet_aton(opts->clientname, &client); while (fgets(line,LINELEN,f)!=NULL) { - if((tmp=index(line, '/'))) { + if((tmp=strchr(line, '/'))) { if(strlen(line)<=tmp-line) { msg4(LOG_CRIT, ERRMSG, line, opts->server->authname); return 0; -- 1.7.7.1