summaryrefslogtreecommitdiffstats
path: root/recipes-sota/asn1c/files/skeletons_dir_fix.patch
diff options
context:
space:
mode:
authorAnton Gerasimov <anton.gerasimov@here.com>2018-02-01 17:28:22 +0100
committerAnton Gerasimov <anton.gerasimov@here.com>2018-02-01 17:28:22 +0100
commit296497365ed9fa11c752d51d1e71b25a054cd5d4 (patch)
treed92477a7b4eb371f1f057e13059bd2e692fbf51e /recipes-sota/asn1c/files/skeletons_dir_fix.patch
parent1ea77e2a98e77956d687cfa6c445518938a5e809 (diff)
parente408922dccefca6cfe103be2dce18d7bcc004f1e (diff)
downloadmeta-updater-296497365ed9fa11c752d51d1e71b25a054cd5d4.tar.gz
Merge branch 'rocko'
Diffstat (limited to 'recipes-sota/asn1c/files/skeletons_dir_fix.patch')
-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