diff options
author | Khem Raj <raj.khem@gmail.com> | 2017-06-28 21:59:05 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-07-06 14:38:14 +0100 |
commit | d9a1adbb48c969cc6f3d50ad254542a9e498b0c4 (patch) | |
tree | 904353d1737ae8a5dae14dc3f0e3f709eb886046 /meta/recipes-gnome/epiphany/files | |
parent | ca3886ac9601c12d22e838c41f65fd886f8d4a45 (diff) | |
download | poky-d9a1adbb48c969cc6f3d50ad254542a9e498b0c4.tar.gz |
epiphany: Fix build errors when compiling with security flags
We need to have some level of optimization level for FORTIFY_SOURCE
to work therefore set --enable-debug=no
Add a patch to fix build error due to unused result of fread
(From OE-Core rev: 8d3bd6fbf748ad6f67bb2e86854d15f99a07bf87)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-gnome/epiphany/files')
-rw-r--r-- | meta/recipes-gnome/epiphany/files/0001-bookmarks-Check-for-return-value-of-fread.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/meta/recipes-gnome/epiphany/files/0001-bookmarks-Check-for-return-value-of-fread.patch b/meta/recipes-gnome/epiphany/files/0001-bookmarks-Check-for-return-value-of-fread.patch new file mode 100644 index 0000000000..ddcd39400c --- /dev/null +++ b/meta/recipes-gnome/epiphany/files/0001-bookmarks-Check-for-return-value-of-fread.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From aa2176be32eed2578da82f34d31148f934c11c34 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 28 Jun 2017 17:03:45 -0700 | ||
4 | Subject: [PATCH] bookmarks: Check for return value of fread() | ||
5 | |||
6 | Fixes below compiler error | ||
7 | ignoring return value of 'fread', declared with attribute warn_unused_result | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | src/bookmarks/ephy-bookmark.c | 3 ++- | ||
14 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/src/bookmarks/ephy-bookmark.c b/src/bookmarks/ephy-bookmark.c | ||
17 | index ff0239b..8633ce4 100644 | ||
18 | --- a/src/bookmarks/ephy-bookmark.c | ||
19 | +++ b/src/bookmarks/ephy-bookmark.c | ||
20 | @@ -217,7 +217,8 @@ ephy_bookmark_init (EphyBookmark *self) | ||
21 | bytes = g_malloc (num_bytes); | ||
22 | |||
23 | fp = fopen ("/dev/urandom", "r"); | ||
24 | - fread (bytes, sizeof (guint8), num_bytes, fp); | ||
25 | + if (fread (bytes, sizeof (guint8), num_bytes, fp) != num_bytes) | ||
26 | + g_warning("Unable to read data from /dev/urandom\n"); | ||
27 | |||
28 | self->id = g_malloc0 (ID_LEN + 1); | ||
29 | for (gsize i = 0; i < num_bytes; i++) { | ||
30 | -- | ||
31 | 2.13.2 | ||
32 | |||