linux: Bump default to version 4.5.4
[buildroot-gz.git] / package / vpnc / 0003-Replace-deprecated-SUSv3-functions-with-POSIX-equiva.patch
blob4b8446ff34cd86805710d2b44822829207d1e844
1 From ca1a9ad59ae07345720e315b928bb014a8aeea4c Mon Sep 17 00:00:00 2001
2 From: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
3 Date: Mon, 8 Feb 2016 23:05:23 +0100
4 Subject: [PATCH] Replace deprecated SUSv3 functions with POSIX equivalents
6 Replace the deprecated SUSv3 function index() by its POSIX equivalent
7 strchr().
9 Patch originally from Bernhard Reutner-Fischer
10 <rep.dot.nop@gmail.com>.
12 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
13 ---
14 config.c | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
17 diff --git a/config.c b/config.c
18 index bdd0833..d1750ca 100644
19 --- a/config.c
20 +++ b/config.c
21 @@ -456,7 +456,7 @@ static char *get_config_filename(const char *name, int add_dot_conf)
23 char *realname;
25 - asprintf(&realname, "%s%s%s", index(name, '/') ? "" : "/etc/vpnc/", name, add_dot_conf ? ".conf" : "");
26 + asprintf(&realname, "%s%s%s", strchr(name, '/') ? "" : "/etc/vpnc/", name, add_dot_conf ? ".conf" : "");
27 return realname;
30 --
31 2.6.4