kumquat-buildroot/package/vpnc/0003-Replace-deprecated-SUSv3-functions-with-POSIX-equiva.patch

33 lines
986 B
Diff
Raw Normal View History

From ca1a9ad59ae07345720e315b928bb014a8aeea4c Mon Sep 17 00:00:00 2001
From: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Date: Mon, 8 Feb 2016 23:05:23 +0100
Subject: [PATCH] Replace deprecated SUSv3 functions with POSIX equivalents
Replace the deprecated SUSv3 function index() by its POSIX equivalent
strchr().
Patch originally from Bernhard Reutner-Fischer
<rep.dot.nop@gmail.com>.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
config.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config.c b/config.c
index bdd0833..d1750ca 100644
--- a/config.c
+++ b/config.c
@@ -456,7 +456,7 @@ static char *get_config_filename(const char *name, int add_dot_conf)
{
char *realname;
- asprintf(&realname, "%s%s%s", index(name, '/') ? "" : "/etc/vpnc/", name, add_dot_conf ? ".conf" : "");
+ asprintf(&realname, "%s%s%s", strchr(name, '/') ? "" : "/etc/vpnc/", name, add_dot_conf ? ".conf" : "");
return realname;
}
--
2.6.4