summaryrefslogtreecommitdiffstats
path: root/recipes-sota/asn1c/files
diff options
context:
space:
mode:
authorLeon Anavi <leon.anavi@konsulko.com>2019-01-02 18:56:35 +0200
committerLeon Anavi <leon.anavi@konsulko.com>2019-01-02 18:56:35 +0200
commit891b967bc74ec8873081d019eda8bbfbb2bc52b7 (patch)
tree13b3f73fcff86c4956a0769d0dfefa9883df42ae /recipes-sota/asn1c/files
parent5beb7ebe843ae4225499c1d2f9ebfebb27698cb8 (diff)
downloadmeta-updater-891b967bc74ec8873081d019eda8bbfbb2bc52b7.tar.gz
asn1c: Backporting from branch Sumo
Backport asn1c from branch Sumo because the latest version of Aktualizr depends on it. Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Diffstat (limited to 'recipes-sota/asn1c/files')
-rw-r--r--recipes-sota/asn1c/files/skeletons_dir_fix.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/recipes-sota/asn1c/files/skeletons_dir_fix.patch b/recipes-sota/asn1c/files/skeletons_dir_fix.patch
new file mode 100644
index 0000000..f1caa2f
--- /dev/null
+++ b/recipes-sota/asn1c/files/skeletons_dir_fix.patch
@@ -0,0 +1,44 @@
1From 1a1c2c94f700cf0f4dc5dba863950b16477fdc6d Mon Sep 17 00:00:00 2001
2From: Laurent Bonnans <laurent.bonnans@here.com>
3Date: Thu, 25 Jan 2018 09:49:41 +0100
4Subject: [PATCH] Patch the skeletons directory detection
5
6Detect `share/asn1c` from `bin/` if it exists
7---
8 asn1c/asn1c.c | 9 ++++-----
9 1 file changed, 4 insertions(+), 5 deletions(-)
10
11diff --git a/asn1c/asn1c.c b/asn1c/asn1c.c
12index eb1eff7c..dd9fc832 100644
13--- a/asn1c/asn1c.c
14+++ b/asn1c/asn1c.c
15@@ -226,22 +226,21 @@ main(int ac, char **av) {
16 if(skeletons_dir == NULL) {
17 struct stat sb;
18 skeletons_dir = DATADIR;
19- if((av[-optind][0] == '.' || av[-optind][1] == '/')
20- && stat(skeletons_dir, &sb)) {
21+ if(stat(skeletons_dir, &sb)) {
22 /*
23 * The default skeletons directory does not exist,
24 * compute it from my file name:
25- * ./asn1c/asn1c -> ./skeletons
26+ * ./asn1c/asn1c -> ./share/asn1c
27 */
28 char *p;
29 size_t len;
30
31 p = a1c_dirname(av[-optind]);
32
33- len = strlen(p) + sizeof("/../skeletons");
34+ len = strlen(p) + sizeof("/../share/asn1c");
35 skeletons_dir = malloc(len);
36 assert(skeletons_dir);
37- snprintf(skeletons_dir, len, "%s/../skeletons", p);
38+ snprintf(skeletons_dir, len, "%s/../share/asn1c", p);
39 if(stat(skeletons_dir, &sb)) {
40 fprintf(stderr,
41 "WARNING: skeletons are neither in "
42--
432.15.1
44