diff options
Diffstat (limited to 'meta/recipes-kernel/oprofile/oprofile/filemode-fix.patch')
-rw-r--r-- | meta/recipes-kernel/oprofile/oprofile/filemode-fix.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/meta/recipes-kernel/oprofile/oprofile/filemode-fix.patch b/meta/recipes-kernel/oprofile/oprofile/filemode-fix.patch new file mode 100644 index 0000000000..f7ebe24691 --- /dev/null +++ b/meta/recipes-kernel/oprofile/oprofile/filemode-fix.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | With security_flags.inc: | ||
2 | |||
3 | | In file included from /media/build1/poky/build/tmp/sysroots/qemumips/usr/include/fcntl.h:302:0, | ||
4 | | from opjitconv.c:25: | ||
5 | | In function 'open', | ||
6 | | inlined from 'copy_dumpfile' at opjitconv.c:219:6: | ||
7 | | /media/build1/poky/build/tmp/sysroots/qemumips/usr/include/bits/fcntl2.h:50:4: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT in second argument needs 3 arguments | ||
8 | | __open_missing_mode (); | ||
9 | | ^ | ||
10 | | Makefile:440: recipe for target 'opjitconv.o' failed | ||
11 | |||
12 | Why does this only happen on mips? mips has: | ||
13 | |||
14 | O_CREAT = 0x100 | ||
15 | and | ||
16 | S_IRUSR = 0400 | ||
17 | |||
18 | and these (in hex and otcal) are equivalent. Most other platforms | ||
19 | have O_CREAT = 0100. | ||
20 | |||
21 | http://sourceforge.net/p/oprofile/oprofile/ci/4598ca73b0a367ca46d4a2843261e20e1896773b | ||
22 | |||
23 | The file should not be created, only opened if its present, therefore use O_RDONLY instead. | ||
24 | |||
25 | RP 2014/11/6 | ||
26 | |||
27 | Upstream-Status: Backport | ||
28 | |||
29 | Index: oprofile-1.0.0/opjitconv/opjitconv.c | ||
30 | =================================================================== | ||
31 | --- oprofile-1.0.0.orig/opjitconv/opjitconv.c 2014-09-12 14:39:47.000000000 +0000 | ||
32 | +++ oprofile-1.0.0/opjitconv/opjitconv.c 2014-11-06 13:14:25.941639003 +0000 | ||
33 | @@ -216,7 +216,7 @@ | ||
34 | int file_locked = 0; | ||
35 | unsigned int usecs_waited = 0; | ||
36 | int rc = OP_JIT_CONV_OK; | ||
37 | - int fd = open(dumpfile, S_IRUSR); | ||
38 | + int fd = open(dumpfile, O_RDONLY); | ||
39 | if (fd < 0) { | ||
40 | perror("opjitconv failed to open JIT dumpfile"); | ||
41 | return OP_JIT_CONV_FAIL; | ||