summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorAndré Draszik <git@andred.net>2016-09-16 16:11:19 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-20 15:11:08 +0100
commit9ead92a00fd35a7c4adf019b22b76dde9ec6427e (patch)
tree88c2ed62670f437121f74c98e199fbaf94313322 /meta
parent0a04692279f83637c0049cb1f91ac684f3fccf1f (diff)
downloadpoky-9ead92a00fd35a7c4adf019b22b76dde9ec6427e.tar.gz
gawk-3.1.5: fix non-glibc & gcc >= v4 builds
See commit message of patch added (From OE-Core rev: bdfce776843bf4287251923c79bc15365c20b4a1) Signed-off-by: André Draszik <git@andred.net> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-extended/gawk/gawk-3.1.5/0001-gawk-fix-non-glibc-gcc-4-compilation.patch67
-rw-r--r--meta/recipes-extended/gawk/gawk_3.1.5.bb7
2 files changed, 72 insertions, 2 deletions
diff --git a/meta/recipes-extended/gawk/gawk-3.1.5/0001-gawk-fix-non-glibc-gcc-4-compilation.patch b/meta/recipes-extended/gawk/gawk-3.1.5/0001-gawk-fix-non-glibc-gcc-4-compilation.patch
new file mode 100644
index 0000000000..bc9201b631
--- /dev/null
+++ b/meta/recipes-extended/gawk/gawk-3.1.5/0001-gawk-fix-non-glibc-gcc-4-compilation.patch
@@ -0,0 +1,67 @@
1From 53496e2e306b16ac59801553f775bcca164e6a39 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <git@andred.net>
3Date: Wed, 14 Sep 2016 16:20:37 +0100
4Subject: [PATCH] fix gcc >= 4 compilation
5
6| ../gawk-3.1.5/hard-locale.h: In function 'hard_locale':
7| ../gawk-3.1.5/hard-locale.h:43:20: error: invalid storage class for function 'xmalloc'
8| static ptr_t xmalloc PARAMS ((size_t n));
9| ^~~~~~~
10
11| ../gawk-3.1.5/hard-locale.h:45:22: warning: implicit declaration of function 'xmalloc' [-Wimplicit-function-declaration]
12| char *locale = xmalloc (strlen (p) + 1);
13| ^~~~~~~
14| ../gawk-3.1.5/hard-locale.h:45:22: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
15| ../gawk-3.1.5/dfa.c: At top level:
16| ../gawk-3.1.5/dfa.c:125:14: error: conflicting types for 'xmalloc'
17| static ptr_t xmalloc PARAMS ((size_t n));
18| ^~~~~~~
19| In file included from ../gawk-3.1.5/dfa.c:112:0:
20| ../gawk-3.1.5/hard-locale.h:45:22: note: previous implicit declaration of 'xmalloc' was here
21| char *locale = xmalloc (strlen (p) + 1);
22| ^~~~~~~
23
24Upstream-Status: Inappropriate [required for gawk 3.1.5 (GPLv2) recipe only]
25
26Signed-off-by: André Draszik <git@andred.net>
27---
28 dfa.c | 2 +-
29 hard-locale.h | 2 --
30 2 files changed, 1 insertion(+), 3 deletions(-)
31
32diff --git a/dfa.c b/dfa.c
33index 71e3736..97f6045 100644
34--- a/dfa.c
35+++ b/dfa.c
36@@ -109,6 +109,7 @@ extern void free();
37
38 #include "regex.h"
39 #include "dfa.h"
40+static ptr_t xmalloc PARAMS ((size_t n));
41 #include "hard-locale.h"
42
43 /* HPUX, define those as macros in sys/param.h */
44@@ -122,7 +123,6 @@ extern void free();
45 static void dfamust PARAMS ((struct dfa *dfa));
46
47 static ptr_t xcalloc PARAMS ((size_t n, size_t s));
48-static ptr_t xmalloc PARAMS ((size_t n));
49 static ptr_t xrealloc PARAMS ((ptr_t p, size_t n));
50 #ifdef DEBUG
51 static void prtok PARAMS ((token t));
52diff --git a/hard-locale.h b/hard-locale.h
53index 0f4986b..9ee57e0 100644
54--- a/hard-locale.h
55+++ b/hard-locale.h
56@@ -40,8 +40,6 @@ hard_locale (int category)
57 if (strcmp (p, "C") == 0 || strcmp (p, "POSIX") == 0)
58 hard = 0;
59 # else
60- static ptr_t xmalloc PARAMS ((size_t n));
61-
62 char *locale = xmalloc (strlen (p) + 1);
63 strcpy (locale, p);
64
65--
662.9.3
67
diff --git a/meta/recipes-extended/gawk/gawk_3.1.5.bb b/meta/recipes-extended/gawk/gawk_3.1.5.bb
index 7c92bded3e..63fd32f4b9 100644
--- a/meta/recipes-extended/gawk/gawk_3.1.5.bb
+++ b/meta/recipes-extended/gawk/gawk_3.1.5.bb
@@ -15,8 +15,11 @@ RDEPENDS_gawk += "gawk-common"
15RDEPENDS_pgawk += "gawk-common" 15RDEPENDS_pgawk += "gawk-common"
16PR = "r2" 16PR = "r2"
17 17
18SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \ 18SRC_URI = "\
19 file://gawk-3.1.5_fix_for_automake-1.12.patch" 19 ${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \
20 file://gawk-3.1.5_fix_for_automake-1.12.patch \
21 file://0001-gawk-fix-non-glibc-gcc-4-compilation.patch \
22"
20 23
21SRC_URI[md5sum] = "4760325489479cac17fe0114b8f62f30" 24SRC_URI[md5sum] = "4760325489479cac17fe0114b8f62f30"
22SRC_URI[sha256sum] = "463dcb9d0ca398b1d4f5a332f6cd9cec56441265fca616f2ea1b44d459e9f0f8" 25SRC_URI[sha256sum] = "463dcb9d0ca398b1d4f5a332f6cd9cec56441265fca616f2ea1b44d459e9f0f8"