diff options
author | Ross Burton <ross.burton@intel.com> | 2015-08-26 21:32:45 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-08-30 12:36:06 +0100 |
commit | f9f1643eadd6a812904e36a1397cf66ce58ff493 (patch) | |
tree | a55bdd5df962adf154323c6b732a7f41a242e61d /meta | |
parent | 6874f5e72f8f57d2118de25ed0bec7406d277faf (diff) | |
download | poky-f9f1643eadd6a812904e36a1397cf66ce58ff493.tar.gz |
byacc: fix compilation on Ubuntu 14.04
Ubuntu defaults to passing _FORTIFY_SOURCE=2 which breaks byacc as it doesn't
pass enough arguments to open():
inlined from 'open_tmpfile' at byacc-20150711/main.c:588:5:
/usr/include/x86_64-linux-gnu/bits/fcntl2.h:50:24: error: call to '__open_missing_mode' declared with attribute error:
open with O_CREAT in second argument needs 3 arguments
Add a mode of 0666 to fix this.
(From OE-Core rev: f906c5eb722de07eb09858fd058eb7e20103df71)
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/byacc/byacc.inc | 4 | ||||
-rw-r--r-- | meta/recipes-extended/byacc/byacc/byacc-open.patch | 13 |
2 files changed, 16 insertions, 1 deletions
diff --git a/meta/recipes-extended/byacc/byacc.inc b/meta/recipes-extended/byacc/byacc.inc index fae9e2504a..f9f8d6b5f0 100644 --- a/meta/recipes-extended/byacc/byacc.inc +++ b/meta/recipes-extended/byacc/byacc.inc | |||
@@ -5,7 +5,9 @@ programming language." | |||
5 | SECTION = "devel" | 5 | SECTION = "devel" |
6 | LICENSE = "PD" | 6 | LICENSE = "PD" |
7 | 7 | ||
8 | SRC_URI = "ftp://invisible-island.net/byacc/byacc-${PV}.tgz" | 8 | SRC_URI = "ftp://invisible-island.net/byacc/byacc-${PV}.tgz \ |
9 | file://byacc-open.patch" | ||
10 | |||
9 | EXTRA_OECONF += "--program-transform-name='s,^,b,'" | 11 | EXTRA_OECONF += "--program-transform-name='s,^,b,'" |
10 | 12 | ||
11 | BBCLASSEXTEND = "native" | 13 | BBCLASSEXTEND = "native" |
diff --git a/meta/recipes-extended/byacc/byacc/byacc-open.patch b/meta/recipes-extended/byacc/byacc/byacc-open.patch new file mode 100644 index 0000000000..9160543400 --- /dev/null +++ b/meta/recipes-extended/byacc/byacc/byacc-open.patch | |||
@@ -0,0 +1,13 @@ | |||
1 | diff --git a/main.c b/main.c | ||
2 | index 620ce3f..82071a4 100644 | ||
3 | --- a/main.c | ||
4 | +++ b/main.c | ||
5 | @@ -526,7 +526,7 @@ my_mkstemp(char *temp) | ||
6 | } | ||
7 | if ((name = tempnam(dname, fname)) != 0) | ||
8 | { | ||
9 | - fd = open(name, O_CREAT | O_EXCL | O_RDWR); | ||
10 | + fd = open(name, O_CREAT | O_EXCL | O_RDWR, 0666); | ||
11 | strcpy(temp, name); | ||
12 | } | ||
13 | else | ||