kumquat-buildroot/package/vpnc/0003-Replace-deprecated-SUSv3-functions-with-POSIX-equiva.patch
Thomas Petazzoni 37451a9dc5 vpnc: switch to github as the new site
The vpnc upstream project has not made any tarball release since many
years, but they have continued to update their Subversion
repository.

A Github repository synced with the Subversion repository now exists
at https://github.com/ndpgroup/vpnc, which is more practical to
generate patches and submit pull requests. For this reason, we move to
using this Github repository as the new source for the vpnc
package. The specific commit that we use corresponds to version 0.5.3
exactly.

All patches are re-formatted using Git.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-04-20 23:11:23 +02:00

33 lines
986 B
Diff

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